-
Notifications
You must be signed in to change notification settings - Fork 7
The API download function
The VertNet API download function supports downloading records as a tab-delimited text file by supplying a query string, filename, and an email address. Download jobs are queued up and an email is sent when the results are ready for download. Emails include a URL for downloading the results from Google Cloud Storage.
The base URL for API download requests is http://api.vertnet-portal.appspot.com/api/download?q=query_object
, where query_object
is a JSON object specifying the request parameters. Request objects must include the following required properties:
- q: the query string
- n: the name to use for the results file
- e: the email address to contact when the results are ready for download
Here's an example download request:
http://api.vertnet-portal.appspot.com/api/download?q={"q":"mappable:1 institutioncode:kstc","n":"mykstctestresults.txt","e":"[email protected]"}
Note that the format of the query string for download requests is exactly the same as for calls to the API search function. Query strings for these two functions are therefore completely interchangeable. The documentation for the search function includes a detailed discussion of how to construct query strings.