Re the thread at wiki.earthdata.nasa.gov/pages/viewpage.action?pageId=182296115 :
The earlier comment:
'... please please please restore a means of getting all the RDF for a concept scheme in one go. It's indeed "very misleading" that the link "Science Keywords [as RDF]" from the static page https://gcmd.earthdata.nasa.gov/static/kms/ now returns only a subset of the keywords, without that page otherwise giving a warning.'
The reply at the time:
'We have a KMS API improvement ticket in to our development team to resolve this issue. If you are interested, you can track it at KMS-217'
Yeah, I can't track it, as I can't log in to that service. So, any news?
Richard.
News on API to get all concepts in one go?
-
- Posts: 256
- Joined: Tue Dec 03, 2019 3:31 pm America/New_York
- Has thanked: 1 time
- Been thanked: 5 times
Re: News on API to get all concepts in one go?
Hi Richard, we implemented paging in the KMS API so you can call all pages for a scheme.
Retrieve Science Keywords Page 1 of 2:
Retrieve Science Keywords Page 2 of 2:
Retrieve All Pages in one query:
You can also limit the page size as well (2000 is the max)
Retrieve Science Keywords Page 1 of 2:
Code: Select all
curl --location --request GET 'https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/sciencekeywords/?format=rdf&page_num=1' \
--header 'Content-Type: text/xml' > science_keywords_page1.xml
Code: Select all
curl --location --request GET 'https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/sciencekeywords/?format=rdf&page_num=2' \
--header 'Content-Type: text/xml' > science_keywords_page2.xml
Code: Select all
curl --location --request GET 'https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/sciencekeywords/?format=rdf&page_num=[1-2]' \
--header 'Content-Type: text/xml' > all_science_keywords.xml
Code: Select all
curl --location --request GET 'https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/sciencekeywords/?format=rdf&page_num=1&page_size=2000' \
--header 'Content-Type: text/xml' > all_science_keywords.xml