ApiAxle API documentation

URI Structure

All ApiAxle requests are prefixed with the version tag (currrently 'v1') with the next segment of the endpoint indicating the type of resource we wish to work with.
For example the following will retrieve a list of APIs:

curl -X GET 'http://localhost:3001/v1/apis'

To work with a specific resource we specify it as the next segment following the resource type.
For example DELETING an API called 'testapi'

curl -X DELETE 'http://localhost:3001/v1/api/testapi'

Response Structure

All API responses are in JSON and include a meta and results block.
The meta block contains the api version and status code. The results block will either be an object or list depending on call.
The following is example output from the /v1/apis call.

{
  "meta": {
    "version": 1,
    "status_code": 200
  },
  "results": [
    "testapi"
  ]
}
In the following command reference examples only the contents of the results field is documents.

This documentation was generated from branch 'develop'

Quick Reference

EndpointDescription
/v1/api/:api Provision a new API.
/v1/api/:api/addcapturepath/:path Add a capture path to :api
/v1/api/:api/capturepath/:capturepath/stats/counters Capture path statistics.
/v1/api/:api/capturepath/:capturepath/stats/timers Capture path statistics.
/v1/api/:api/capturepaths List capture paths.
/v1/api/:api/capturepaths/stats/counters View all capture path counters for :api.
/v1/api/:api/capturepaths/stats/timers View all capture path counts for :api.
/v1/api/:api/delcapturepath/:path Delete a capture path from :api
/v1/api/:api/keycharts Get the most used keys for this api.
/v1/api/:api/keys List keys belonging to an API.
/v1/api/:api/linkkey/:key Associate a key with an API
/v1/api/:api/stats Get stats for an api
/v1/api/:api/stats/timers Get timer stats for an api
/v1/api/:api/unlinkkey/:key Disassociate a key with an API.
/v1/apis List all APIs.
/v1/apis/charts Get the most used APIs and their hit counts.
/v1/docs/controllers JSON representation of the controller docs.
/v1/docs/models JSON representation of the model docs.
/v1/info Information about this project.
/v1/key/:key Provision a new key.
/v1/key/:key/apicharts Get the most used apis for this key.
/v1/key/:key/apis List apis belonging to a key.
/v1/key/:key/stats Get the real time hits for a key.
/v1/keyring/:keyring Provision a new KEYRING.
/v1/keyring/:keyring/keys List keys belonging to an KEYRING.
/v1/keyring/:keyring/linkkey/:key Associate a key with a KEYRING.
/v1/keyring/:keyring/stats Get stats for an keyring
/v1/keyring/:keyring/unlinkkey/:key Disassociate a key with a KEYRING.
/v1/keyrings List all KEYRINGs.
/v1/keys List all of the available keys.
/v1/keys/all List stats for all available keys.
/v1/keys/charts Get the most used keys and their hit counts.
/v1/ping Ping the API for a super fast response.

/v1/api/:api

post Provision a new API.

curl -H 'content-type: application/json' \
	-X POST \
	-d '{"endPoint":"testapi.api.local"}' \
	'http://localhost/v1/api/testapi' 

Input

createdAt(optional)
updatedAt(optional)
endPointThe endpoint for the API. For example; `graph.facebook.com`
protocol(default: http) The protocol for the API, whether or not to use SSL
tokenSkewProtectionCount(default: 3) The amount of seconds you allow a valid token to be calculated against, either side of the current second. The higher the number the greater the computational cost.
apiFormat(default: json) The resulting data type of the endpoint. This is redundant at the moment but will eventually support both XML too.
endPointTimeout(default: 2) Seconds to wait before timing out the connection
extractKeyRegex(optional) Regular expression used to extract API key from url. Axle will use the **first** matched grouping and then apply that as the key. Using the `api_key` or `apiaxle_key` will take precedence.
defaultPath(optional) An optional path part that will always be called when the API is hit.
disabled(default: false) Disable this API causing errors when it's hit.
strictSSL(default: true) Set to true to require that SSL certificates be valid.
sendThroughApiKey(default: false) If true then the api_key parameter will be passed through in the request.
sendThroughApiSig(default: false) If true then the api_sig parameter will be passed through in the request.
hasCapturePaths(default: false) When true ApiAxle will parse and capture bits of information about the API being called.
allowKeylessUse(default: false) (optional) If true then allow for keyless access to this API. Also see keylessQps, keylessQpm, and keylessQpd.
keylessQps(default: 2) How many queries per second an anonymous key should have.
keylessQpm(default: 120) How many queries per minute an anonymous key should have.
keylessQpd(default: 172800) How many queries per day an anonymous key should have.
qps(default: 2) Number of queries that can be called per second. Set to `-1` for no limit.
qpm(default: -1) Number of queries that can be called per minute. Set to `-1` for no limit.
qpd(default: 172800) Number of queries that can be called per day. Set to `-1` for no limit.
corsEnabled(default: false) (optional) Whether or not you want to enable CORS (http://www.w3.org/TR/cors/) support. This enables CORS for all origins and is intended to be simple and cover the majority of users. If you need more refined configuration we suggest you use something like varnish or nginx to do this. Note that your API endpoint should support the OPTIONS method which is often used in 'preflight' requests for the XHR object to verify CORS headers. When enabled, the following headers will be returned: Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token Access-Control-Expose-Headers: content-type, content-length, X-ApiaxleProxy-Qps-Left, X-ApiaxleProxy-Qpm-Left, X-ApiaxleProxy-Qpd-Left
errorMessage(optional) This gets added as an info property to any errors returned by the proxy for this api.
additionalHeaders(optional) URL encoded list of headers and values to be transformed into headers on the endpoint call, e.g., X-SPECIAL=1234&X-VENDOR-TYPE=abc&UNIQUE-VALUE=2js3j%3Dasd

Response

A JSON object containing API details

get Get the definition of an API

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi' 

Response

The API structure (including the timestamp fields).

delete Delete an API

curl -H 'content-type: application/json' \
	-X DELETE \
	'http://localhost/v1/api/testapi' 

Note: This will have no impact on any statistics or keys associated with the API

Response

TRUE on success

put Update an API

curl -H 'content-type: application/json' \
	-X PUT \
	-d '{"endPoint":"testapi.api.local"}' \
	'http://localhost/v1/api/testapi' 

Will overwrite any fields specified in the input data.
Any unspecified will remain unchanged.

Input

createdAt(optional)
updatedAt(optional)
endPointThe endpoint for the API. For example; `graph.facebook.com`
protocol(default: http) The protocol for the API, whether or not to use SSL
tokenSkewProtectionCount(default: 3) The amount of seconds you allow a valid token to be calculated against, either side of the current second. The higher the number the greater the computational cost.
apiFormat(default: json) The resulting data type of the endpoint. This is redundant at the moment but will eventually support both XML too.
endPointTimeout(default: 2) Seconds to wait before timing out the connection
extractKeyRegex(optional) Regular expression used to extract API key from url. Axle will use the **first** matched grouping and then apply that as the key. Using the `api_key` or `apiaxle_key` will take precedence.
defaultPath(optional) An optional path part that will always be called when the API is hit.
disabled(default: false) Disable this API causing errors when it's hit.
strictSSL(default: true) Set to true to require that SSL certificates be valid.
sendThroughApiKey(default: false) If true then the api_key parameter will be passed through in the request.
sendThroughApiSig(default: false) If true then the api_sig parameter will be passed through in the request.
hasCapturePaths(default: false) When true ApiAxle will parse and capture bits of information about the API being called.
allowKeylessUse(default: false) (optional) If true then allow for keyless access to this API. Also see keylessQps, keylessQpm, and keylessQpd.
keylessQps(default: 2) How many queries per second an anonymous key should have.
keylessQpm(default: 120) How many queries per minute an anonymous key should have.
keylessQpd(default: 172800) How many queries per day an anonymous key should have.
qps(default: 2) Number of queries that can be called per second. Set to `-1` for no limit.
qpm(default: -1) Number of queries that can be called per minute. Set to `-1` for no limit.
qpd(default: 172800) Number of queries that can be called per day. Set to `-1` for no limit.
corsEnabled(default: false) (optional) Whether or not you want to enable CORS (http://www.w3.org/TR/cors/) support. This enables CORS for all origins and is intended to be simple and cover the majority of users. If you need more refined configuration we suggest you use something like varnish or nginx to do this. Note that your API endpoint should support the OPTIONS method which is often used in 'preflight' requests for the XHR object to verify CORS headers. When enabled, the following headers will be returned: Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token Access-Control-Expose-Headers: content-type, content-length, X-ApiaxleProxy-Qps-Left, X-ApiaxleProxy-Qpm-Left, X-ApiaxleProxy-Qpd-Left
errorMessage(optional) This gets added as an info property to any errors returned by the proxy for this api.
additionalHeaders(optional) URL encoded list of headers and values to be transformed into headers on the endpoint call, e.g., X-SPECIAL=1234&X-VENDOR-TYPE=abc&UNIQUE-VALUE=2js3j%3Dasd

Response

The new structure and the old one.

/v1/api/:api/addcapturepath/:path

put Add a capture path to :api

curl -H 'content-type: application/json' \
	-X PUT \
	'http://localhost/v1/api/testapi/addcapturepath/:path' 

Add a path that will have statistics associated with it.

Response

The path added.

/v1/api/:api/capturepath/:capturepath/stats/counters

get Capture path statistics.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/capturepath/:capturepath/stats/counters' 

List details of counter stats for :capturepath belonging to :api.

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
forkey(optional) Narrow results down to all statistics for the specified key.
forkeyring(optional) Narrow results down to all statistics for the specified keyring.

Response

Objects with timestamp:count.

/v1/api/:api/capturepath/:capturepath/stats/timers

get Capture path statistics.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/capturepath/:capturepath/stats/timers' 

List details of timing stats for :capturepath belonging to :api.

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.

Response

Objects with timestamps as the key, each referencing an array containing min, max and average times.

/v1/api/:api/capturepaths

get List capture paths.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/capturepaths' 

List all of the capture paths belonging to :api.

Response

List of paths.

/v1/api/:api/capturepaths/stats/counters

get View all capture path counters for :api.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/capturepaths/stats/counters' 

All capture paths and their counts for :api.

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
forkey(optional) Narrow results down to all statistics for the specified key.
forkeyring(optional) Narrow results down to all statistics for the specified keyring.

Response

Objects with timestamp:count.

/v1/api/:api/capturepaths/stats/timers

get View all capture path counts for :api.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/capturepaths/stats/timers' 

All capture paths and their timings for :api.

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
forkey(optional) Narrow results down to all statistics for the specified key.
forkeyring(optional) Narrow results down to all statistics for the specified keyring.

Response

Objects with timestamps as the key, each referencing an array containing min, max and average times.

/v1/api/:api/delcapturepath/:path

put Delete a capture path from :api

curl -H 'content-type: application/json' \
	-X PUT \
	'http://localhost/v1/api/testapi/delcapturepath/:path' 

Remove a path and prevent statistics being collected for it.

Response

The path removed.

/v1/api/:api/keycharts

get Get the most used keys for this api.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/keycharts' 

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.

Response

List of the top 1000 keys and their hit rate for time period GRANULARITY

/v1/api/:api/keys

get List keys belonging to an API.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/keys' 

Params

from(default: 0) The index of the first key you want to see. Starts at zero.
to(default: 10) The index of the last key you want to see. Starts at zero.
resolve(default: false) If set to `true` then the details concerning the listed keys will also be printed. Be aware that this will come with a minor performace hit.

Response

With resolve: An object mapping each key to the corresponding details.
Without resolve: An array with 1 key per entry

/v1/api/:api/linkkey/:key

put Associate a key with an API

curl -H 'content-type: application/json' \
	-X PUT \
	'http://localhost/v1/api/testapi/linkkey/1234' 

Calls to the API can be made with this key once this is run.
Both the key and the API must already exist before running.

Response

The linked key details

/v1/api/:api/stats

get Get stats for an api

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/stats' 

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
forkey(optional) Narrow results down to all statistics for the specified key.
forkeyring(optional) Narrow results down to all statistics for the specified keyring.

Response

Object where the keys represent the cache status (cached, uncached or error), each containing an object with response codes or error name, these in turn contain objects with timestamp:count

/v1/api/:api/stats/timers

get Get timer stats for an api

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/api/testapi/stats/timers' 

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
debug(default: false) (optional) Show some ApiAxle related timings too.

Response

Object where the keys represent the type of timer, these in turn contain objects with timestamp: [ min, max, avg ]. The values in the array are a span of time measured in ms.

/v1/api/:api/unlinkkey/:key

put Disassociate a key with an API.

curl -H 'content-type: application/json' \
	-X PUT \
	'http://localhost/v1/api/testapi/unlinkkey/1234' 

Response

The Unlinked key details

/v1/apis

get List all APIs.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/apis' 

Params

from(default: 0) Integer for the index of the first api you want to see. Starts at zero.
to(default: 10) Integer for the index of the last api you want to see. Starts at zero.
resolve(default: false) If set to `true` then the details concerning the listed apis will also be printed. Be aware that this will come with a minor performace hit.

Response

With resolve: An object mapping each API to the corresponding details.
Without resolve: An array with 1 API per entry

/v1/apis/charts

get Get the most used APIs and their hit counts.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/apis/charts' 

Params

granularity(default: minute) Get charts for the most recent values in the most recent GRANULARTIY.

Response

List of the top 100 APIs and their hit rate for time perioud GRANULATIRY

/v1/docs/controllers

get JSON representation of the controller docs.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/docs/controllers' 

Response

JSON for each controller.

/v1/docs/models

get JSON representation of the model docs.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/docs/models' 

Response

JSON for each model, including types etc.

/v1/info

get Information about this project.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/info' 

Response

Package file output.

/v1/key/:key

post Provision a new key.

curl -H 'content-type: application/json' \
	-X POST \
	-d '{"qpd":"...","qpm":"...","qps":"..."}' \
	'http://localhost/v1/key/1234' 

Input

createdAt(optional)
updatedAt(optional)
sharedSecret(optional) A shared secret which is used when signing a call to the api.
qpdNumber of queries that can be called per day. Set to `-1` for no limit.
qpmNumber of queries that can be called per minute. Set to `-1` for no limit.
qpsNumber of queries that can be called per second. Set to `-1` for no limit.
forApis(optional) Names of the Apis that this key belongs to.
disabled(default: false) Disable this API causing errors when it's hit.
apiLimits(optional) Custom api-specific limits. JSON encoded: '{"api1": {"qpd":5, "qps":2}, "api2": {"qpd":2}}'
allApis(optional) Allow this key to work for all APIs

Params

isNSA(default: false) If you're the NSA set this flag to true and you'll activate GOD mode getting you into any API regardless of your being linked to it or not.

Response

The newly inserted structure (including the new timestamp fields).

get Get the definition of a key.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/key/1234' 

Response

The key object (including timestamps).

delete Delete a key.

curl -H 'content-type: application/json' \
	-X DELETE \
	'http://localhost/v1/key/1234' 

Response

TRUE on success

put Update a key.

curl -H 'content-type: application/json' \
	-X PUT \
	-d '{"qpd":"...","qpm":"...","qps":"..."}' \
	'http://localhost/v1/key/1234' 

Fields passed in will will be merged with the old key details.
Note: In the case of updating a key's `QPD` it will get the new amount of calls minus the amount of calls it has already made.

Input

createdAt(optional)
updatedAt(optional)
sharedSecret(optional) A shared secret which is used when signing a call to the api.
qpdNumber of queries that can be called per day. Set to `-1` for no limit.
qpmNumber of queries that can be called per minute. Set to `-1` for no limit.
qpsNumber of queries that can be called per second. Set to `-1` for no limit.
forApis(optional) Names of the Apis that this key belongs to.
disabled(default: false) Disable this API causing errors when it's hit.
apiLimits(optional) Custom api-specific limits. JSON encoded: '{"api1": {"qpd":5, "qps":2}, "api2": {"qpd":2}}'
allApis(optional) Allow this key to work for all APIs

Response

The new structure and the old one.

/v1/key/:key/apicharts

get Get the most used apis for this key.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/key/1234/apicharts' 

Params

granularity(default: minute) Get charts for the most recent values in the most recent GRANULARTIY.

Response

List of the top 100 APIs and their hit rate for time period GRANULARITY

/v1/key/:key/apis

get List apis belonging to a key.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/key/1234/apis' 

Params

resolve(default: false) If set to `true` then the details concerning the listed apis will also be printed. Be aware that this will come with a minor performace hit.

Response

With resolve: An object mapping each key to the corresponding details.
Without resolve: An array with 1 key per entry

/v1/key/:key/stats

get Get the real time hits for a key.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/key/1234/stats' 

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
forapi(optional) Narrow results down to all statistics for the specified api.

Response

Object where the keys represent the cache status (cached, uncached or error), each containing an object with response codes or error name, these in turn contain objects with timestamp:count

/v1/keyring/:keyring

post Provision a new KEYRING.

curl -H 'content-type: application/json' \
	-X POST \
	-d '{}' \
	'http://localhost/v1/keyring/1234ring' 

Input

createdAt(optional)
updatedAt(optional)

Response

The inserted structure (including the new timestamp fields).

get Get the definition for an KEYRING.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keyring/1234ring' 

Response

The KEYRING structure (including the timestamp fields).

delete Delete an KEYRING.

curl -H 'content-type: application/json' \
	-X DELETE \
	'http://localhost/v1/keyring/1234ring' 

Response

TRUE on success

put Update an KEYRING.

curl -H 'content-type: application/json' \
	-X PUT \
	-d '{}' \
	'http://localhost/v1/keyring/1234ring' 

Input

createdAt(optional)
updatedAt(optional)

Response

The merged structure (including the timestamp fields).

/v1/keyring/:keyring/keys

get List keys belonging to an KEYRING.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keyring/1234ring/keys' 

Params

from(default: 0) The index of the first key you want to see. Starts at zero.
to(default: 10) The index of the last key you want to see. Starts at zero.
resolve(default: false) If set to `true` then the details concerning the listed keys will also be printed. Be aware that this will come with a minor performace hit.

Response

With resolve: An object mapping each key to the corresponding details.
Without resolve: An array with 1 key per entry

/v1/keyring/:keyring/linkkey/:key

put Associate a key with a KEYRING.

curl -H 'content-type: application/json' \
	-X PUT \
	'http://localhost/v1/keyring/1234ring/linkkey/:key' 

The key must already exist and will not be modified by this operation.

Response

The linked key details.

/v1/keyring/:keyring/stats

get Get stats for an keyring

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keyring/1234ring/stats' 

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.
forkey(optional) Narrow results down to all statistics for the specified key.
forapi(optional) Narrow results down to all statistics for the specified api.

Response

Object where the keys represent the cache status (cached, uncached or error), each containing an object with response codes or error name, these in turn contain objects with timestamp:count

/v1/keyring/:keyring/unlinkkey/:key

put Disassociate a key with a KEYRING.

curl -H 'content-type: application/json' \
	-X PUT \
	'http://localhost/v1/keyring/1234ring/unlinkkey/:key' 

Response

The unlinked key details.

/v1/keyrings

get List all KEYRINGs.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keyrings' 

Params

from(default: 0) Integer for the index of the first keyring you want to see. Starts at zero.
to(default: 10) Integer for the index of the last keyring you want to see. Starts at zero.
resolve(default: false) If set to `true` then the details concerning the listed keyrings will also be printed. Be aware that this will come with a minor performace hit.

Response

With resolve: An object mapping each keyring to the corresponding details.
Without resolve: An array with 1 keyring per entry

/v1/keys

get List all of the available keys.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keys' 

Params

from(default: 0) The index of the first key you want to see. Starts at zero.
to(default: 10) The index of the last key you want to see. Starts at zero.
resolve(default: false) If set to `true` then the details concerning the listed keys will also be printed. Be aware that this will come with a minor performace hit.

Response

With resolve: An object mapping each key to the corresponding details.
Without resolve: An array with 1 key per entry

/v1/keys/all

get List stats for all available keys.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keys/all' 

Params

from(default: [generated at runtime] The unix epoch from which to start gathering the statistics. Defaults to `now - 10 minutes`.
to(default: [generated at runtime] The unix epoch from which to finish gathering the statistics. Defaults to `now`.
granularity(default: minute) Allows you to gather statistics tuned to this level of granularity. Results will still arrive in the form of an epoch to results pair but will be rounded off to the nearest unit.
format_timeseries(default: false) Results will be returned in a format more suited to generating timeseries graphs.
format_timestamp(default: epoch_seconds) Format the timestamps a particular way.

Response

Return stats for all available keys.

/v1/keys/charts

get Get the most used keys and their hit counts.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/keys/charts' 

Params

granularity(default: minute) Get charts for the most recent values in the most recent GRANULARTIY.

Response

List of the top 100 keys and their hit rate for time perioud GRANULATIRY

/v1/ping

get Ping the API for a super fast response.

curl -H 'content-type: application/json' \
	-X GET \
	'http://localhost/v1/ping' 

Response

Just a 'pong'.