I'm using API v2 for order management in the profiles namespace.
Here are my request details:
Method=PUT, URL=https://ladsweb.modaps.eosdis.nasa.gov/api/v2/profiles/orders/502398729,
Headers (e.g., Authorization: Bearer [token], Accept: application/json, User-Agent: [your UA]),
Body/Params tried (form data={"op": "release"}, query ?op=release, json={"op": "release"}).
However, I always get 404 errors. The reference # from the error (e.g., 9bb887376b895085d8ccbd5860203236, and any previous ones).
What is the correct request format to release an order using PUT /api/v2/profiles/orders/{orderId} with op=release? Please provide a curl example if possible.
What is the correct request format to release an order thru API?
-
- Posts: 29
- Joined: Sun Jul 31, 2005 9:10 pm America/New_York
- Endorsed: 1 time
-
- User Services
- Posts: 52
- Joined: Fri Dec 13, 2024 2:40 pm America/New_York
- Has endorsed: 8 times
- Endorsed: 1 time
Re: What is the correct request format to release an order thru API?
Try the following:
curl -X PUT \
-H "Authorization: Bearer YOUR_EARTHDATA_LOGIN_TOKEN_HERE" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'orderOp=release' \
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/profiles/orders/YOUR_ORDER_ID_HERE
Note that this command is all one line. The “\” escapes the newline character if you run this in a terminal and want to type it on multiple lines as it is presented here. If you type all on one line, you should leave the “\” characters out, eg.
curl -X PUT -H "Authorization: Bearer YOUR_EARTHDATA_LOGIN_TOKEN_HERE" -H "Content-Type: application/x-www-form-urlencoded" -d 'orderOp=release' https://ladsweb.modaps.eosdis.nasa.gov/api/v2/profiles/orders/YOUR_ORDER_ID_HERE
curl -X PUT \
-H "Authorization: Bearer YOUR_EARTHDATA_LOGIN_TOKEN_HERE" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'orderOp=release' \
https://ladsweb.modaps.eosdis.nasa.gov/api/v2/profiles/orders/YOUR_ORDER_ID_HERE
Note that this command is all one line. The “\” escapes the newline character if you run this in a terminal and want to type it on multiple lines as it is presented here. If you type all on one line, you should leave the “\” characters out, eg.
curl -X PUT -H "Authorization: Bearer YOUR_EARTHDATA_LOGIN_TOKEN_HERE" -H "Content-Type: application/x-www-form-urlencoded" -d 'orderOp=release' https://ladsweb.modaps.eosdis.nasa.gov/api/v2/profiles/orders/YOUR_ORDER_ID_HERE
Regards,
LAADS User Services
To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.
LAADS User Services
To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.
-
- Posts: 29
- Joined: Sun Jul 31, 2005 9:10 pm America/New_York
- Endorsed: 1 time
Re: What is the correct request format to release an order thru API?
Worked like a charm! Thank you!