How to Make APIs - Advanced
How to Make A Free API with Apigee…
- Host a CSV that includes the metadata fields in the header row.
- Add a JSON layer
- Add parameters
- Document the end result
Producing an API with Solr
When you say that you are using the engine’s DSL, be sure to find and link to the best ElasticSearch DSL documentation, too. (Note, we should suggest a link. One candidate.)
Producing an API with ElasticSearch
Producing APIs through Socrata’s API Foundry
Producing APIs through Socrata’s Data Catalog
One way agencies can offer APIs for their data is to use the built–in functionality of Socrata’s data catalog. The information that is hosted as interactive datasets have an API layer which agencies can make available through documentation in the developer’s section of the agency’s website.
The guide below will help you do this.
Upload a dataset as an interactive dataset in a Socrata data catalog.
Once the dataset is live in your interactive datasets catalog, click on ‘Export’ (in the top right), then ‘API’. You’ll need the resulting information in a moment.
Create an html page within your agency’s developer hub that will serve as an API homepage for this documentation (e.g., www.agency.gov/developer/name-of-api).
Customize the template below with the appropriate API information from your interactive dataset (see #2) and add the information to the API homepage that you’ve created.
a. For the API URL, copy the ‘API Access Endpoint’, remove the ‘json’ suffix, and insert ‘[format]’.
b. The ‘Response Format’, ‘Type’, and ‘Authentication’ fields do not need customizing.
c. For the ‘Example Requests’, begin with the dataset’s ‘API Access Endpoint’, and customize it with parameters and values that demonstrate potential uses of this dataset’s API.
d. For the Parameter’s Chart, describe each of the parameters listed in the ‘Column IDs’ and provide examples that are used in the dataset. It may be appropriate to combine some Column IDs, for instance, along the lines of the example below.
Include a link to the ‘Further Developer Documentation’ that Socrata offers.
Link to any additional developer resources you create to a ‘Related Resources’ section.
Name of Dataset
This section is a description of the dataset and some background for the API. Use plain language to describe what the underlying data is and what developers can do with it. Avoid insider language and acronyms—remember to ask whether someone who is new to your agency’s work would easily understand it.
[See the example for a model to use]
Parameters and Values
Create a table with columns for Parameter, Type, Description, Sample, and Values. See the example API for a model to use.
Further Developer Documentation
Include any additional resources your team can offer developers.
To see this model in action, check out GSA’s Per Diem API.
Producing APIs through CKAN
Also - Through contracting a gov’t agency that provides IT as a shared service. 18F, federal consulting group, who else?