clarifications needed for fields reference in documentation #211
Replies: 7 comments 1 reply
-
@tloubrieu-jpl can you see what is going on here? |
Beta Was this translation helpful? Give feedback.
-
@plawton-umd it looks like you are missing the
that being said, the |
Beta Was this translation helpful? Give feedback.
-
but for instance, it looks like this works:
|
Beta Was this translation helpful? Give feedback.
-
note the field is |
Beta Was this translation helpful? Give feedback.
-
@plawton-umd @jordanpadams sorry for my late reply. Indeed --get is making the request to be an HTTP GET request which s the ne supported by the API currently. Without that option, curl makes a POST request which is not supported by the API which is why you were getting the method not allowed message. |
Beta Was this translation helpful? Give feedback.
-
@jordanpadams Regarding the doc which need to be fixed it is related to sphinx postprocessing of the text which removes namespaces... I need to find a way to skip that. |
Beta Was this translation helpful? Give feedback.
-
@tloubrieu-jpl hmmmm. ok we can look into that. the documentation bugs I think I actually just fixed. there were a couple instances where I found |
Beta Was this translation helpful? Give feedback.
-
Hello,
Working from the https://nasa-pds.github.io/pds-api/guides/search/endpoints.html page.
The "limit=" and "summary-only=true" options work with "--data-urlencode". Thank you.
However, "fields" is returning "Method Not Allowed".
Examples,
curl https://pds.nasa.gov/api/search-sbnumd/1.0/bundles/urn:nasa:pds:gbo-kpno::4.0/collections --data-urlencode 'fields=Time_Coordinates.start_date_time' | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 0 139 100 39 134 37 0:00:01 0:00:01 --:--:-- 171
{
"error" : "Method Not Allowed",
"message" : "",
"path" : "/bundles/urn:nasa:pds:gbo-kpno::4.0/collections",
"status" : 405,
"timestamp" : 1659118809520
}
Also tried including the "pds:"
curl https://pds.nasa.gov/api/search-sbnumd/1.0/bundles/urn:nasa:pds:gbo-kpno::4.0/collections --data-urlencode 'fields=pds:Time_Coordinates.start_date_time' | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 0 139 100 45 150 48 --:--:-- --:--:-- --:--:-- 199
{
"error" : "Method Not Allowed",
"message" : "",
"path" : "/bundles/urn:nasa:pds:gbo-kpno::4.0/collections",
"status" : 405,
"timestamp" : 1659118862728
}
The output of "curl https://pds.nasa.gov/api/search-sbnumd/1.0/bundles/urn:nasa:pds:gbo-kpno::4.0/collections"
includes the "pds:Time_Coordinates.pds:start_date_time" (NOTE: an extra "pds") which also has not worked in
the examples. Trying a simpler field name, "lid", returned the same error message.
curl https://pds.nasa.gov/api/search-sbnumd/1.0/bundles/urn:nasa:pds:gbo-kpno::4.0/collections --data-urlencode 'fields=lid' | json_pp % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 149 0 139 100 10 276 19 --:--:-- --:--:-- --:--:-- 296
{
"error" : "Method Not Allowed",
"message" : "",
"path" : "/bundles/urn:nasa:pds:gbo-kpno::4.0/collections",
"status" : 405,
"timestamp" : 1659121356558
}
Suggestions please.
Thanks,
Pat
Beta Was this translation helpful? Give feedback.
All reactions