Skip to content
brylie edited this page Nov 13, 2014 · 2 revisions

##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.

Name

Backend

Define the server where the API is hosted. Multiple servers can be defined to perform load balancing.

Backend Protocol

Server

Host

Frontend Host

Backend Host

Matching URL Prefixes

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

Frontend prefix

Backendend prefix

Global Request Settings

Append Query String Parameters

Set Headers

HTTP Basic Authentication

HTTPS Requirements

API Key Checks

Required Roles

Pass API Key to Backend (deprecated)

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).

Rate Limit

Sub-URL Request Settings

Change settings for specific sub-URLs within this API.

Http method

Regex

HTTPS Requirements

API Key Checks

Required Roles

Pass API Key to Backend (deprecated)

Rate Limit

Advanced Requests Rewriting

Modify the incoming request's URL or headers before passing it to the backend.

Matcher type

Http method

Frontend matcher

Backend replacement

Advanced Settings

Balance algorithm

Options:

  • Least Connections
  • Round Robin
  • Source IP Hash

Error Templates

JSON Template

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}}
  }
}

XML Template

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>

CSV Template

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}}

Error Data

API Key Missing

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}}

API Key Invalid

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}}

API Key Disabled

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

API Key Unauthorized

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

Over Rate Limit

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