-
Notifications
You must be signed in to change notification settings - Fork 325
Add API Backend
##Overview This page describes the fields on the Add API Backend screen.
Note: Language here should be concise and clear, so that it may be useful to include as inline documentation on the UI.
Define the server where the API is hosted. Multiple servers can be defined to perform load balancing.
What URL prefixes on api.data.gov should be routed to this backend?
Example:
Incoming Frontend Request: http://api.data.govexample.json?param=value
Outgoing Backend Request: http://api.data.govexample.json?param=value
Whether to pass the user's api key to this API backend.
Deprecated: This is deprecated and support of this will be removed in the future. Enabling either option is not recommend.
If your API backend needs to uniquely reference the requesting user, use the X-Api-User-Id HTTP header
instead.
Note: Passing via GET query parameter with render API Umbrella's HTTP caching layer mostly ineffectual (since the cache will be mainted per api key).
Change settings for specific sub-URLs within this API.
Modify the incoming request's URL or headers before passing it to the backend.
Options:
- Least Connections
- Round Robin
- Source IP Hash
A Handlebars template of the JSON error response. Available Handlebars variables are defined below in the Error Data section.
Default template:
{
"error": {
"code": {{code}},
"message": {{message}}
}
}
A Handlebars template of the XML error response. Available Handlebars variables are defined below in the Error Data section.
Default template:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>
<code>{{code}}</code>
<message>{{message}}</message>
</error>
</response>
A Handlebars template of the CSV error response. Available Handlebars variables are defined below in the Error Data section.
Default template:
Error Code,Error Message
{{code}},{{message}}
YAML definition of the Handlebars variables available to the error templates.
Default data:
status_code: 403
code: API_KEY_MISSING
message: No api_key was supplied. Get one at {{signupUrl}}
YAML definition of the Handlebars variables available to the error templates.
Default data:
status_code: 403
code: API_KEY_INVALID
message: An invalid api_key was supplied. Get one at {{signupUrl}}
YAML definition of the Handlebars variables available to the error templates.
Default data:
status_code: 403
code: API_KEY_DISABLED
message: The api_key supplied has been disabled. Contact us at {{contactUrl}} for assistance
YAML definition of the Handlebars variables available to the error templates.
Default data:
status_code: 403
code: API_KEY_UNAUTHORIZED
message: The api_key supplied is not authorized to access the given service. Contact us at {{contactUrl}} for assistance
YAML definition of the Handlebars variables available to the error templates.
Default data:
status_code: 429
code: OVER_RATE_LIMIT
message: You have exceeded your rate limit. Try again later or contact us at {{contactUrl}} for assistance