- Select the environment you will be working in from the CMR environments table below.
CMR Environments Table
Base API URL (through ECHO)
Associated URS Environment
User Acceptance Test (UAT)
Systems Integration Test (SIT)
2. On a terminal window execute the curl command for the environment you selected.
curl -X POST --header
"<token><username>sample_username</username><password>sample-password</password><client_id>client_name_of_your_choosing</client_id><user_ip_address>your_origin_ip_address</user_ip_address> <provider>Provider Id</provider></token>"
- Depending on the environment you selected, the Base API URL may be different from the example. If so, replace the purple text with the correct Base API URL.
- If you are embedding the token REST messages into a programming language, create an HTTP message and place the same components from the curl example into either the message header or body.
- The <provider> element in blue in the example above is only used if you are planning on working on behalf of a data provider (ingesting). It is not necessary for Client developers who are searching.
- If you have special characters in your password, you will probably need to escape them using a backslash.
If you don't want to escape any characters, but still want to use curl - implement the "file input" option to create a file that looks like the following:
Note: mytokengenerator.xml can be used as a file name, which simplifies the command. See example underneath step 2 for original command and the example below for simplified command.
Provided a successful response is received, an HTTP success status code of 200 is supplied with the response. Below is a sample response from the curl call - where the value in the ID tag is the token you will use as the value in the Echo-Token header: