Skip to main content
Version: 51.0.0

a9s CF Service Guard API v1

This section describes the API v1 of the a9s CF Service Guard component.

Info

This endpoint exposes general configuration information about the a9s CF Service Guard.

Request

Route

GET /v1/info

cURL

curl "${url}/v1/info"

Response

Body

For success responses, the following fields are defined:

Response FieldTypeDescription
versionstringThe version of the a9s CF Service Guard.
cloud_foundrystringThe API of the configured Cloud Foundry.
asg_prefixstringThe prefix for the name of the ASGs created by the a9s CF Service Guard.
service_brokersarray of stringsThe list of configured a9s Service Brokers.
allowed_consul_nodesarray of stringsThe list of allowed Consul node names.

Example:

{
"version": "2.0.0",
"cloud_foundry": "https://api.cf.example.com",
"asg_prefix": "a9s-asg",
"service_brokers": [
"https://broker1.example.com:3001"
"http://broker2.example.com:3000"
],
"allowed_consul_nodes": [
"^([a-z][a-z0-9]*)?d[a-f0-9]+(-foo-)[0-9]+$",
"^([a-z][a-z0-9]*)?d[a-f0-9]+(-bar-)[0-9]+$"
]
}

For error responses, the following fields are defined:

Response FieldTypeDescription
errorstringA single word, in camel case, that uniquely identifies the error condition.
descriptionstringA user-facing error message explaining why the request failed.

Status

Status CodeDescription
200 OKIs returned if the request has been processed successfully.
500 Internal Server ErrorIs returned if an unexpected error occurred while handling the request.

API Status

This endpoint can be used to see if the a9s CF Service Guard API is available.

Request

Route

GET /v1/healthy

cURL

curl "${url}/v1/healthy"

Response

Body

For success responses, the following fields are defined:

Response FieldTypeDescription
statusstringIs always ok.

Example:

{
"status": "ok"
}

For error responses, the following fields are defined:

Response FieldTypeDescription
errorstringA single word, in camel case, that uniquely identifies the error condition.
descriptionstringA user-facing error message explaining why the request failed.

Status

Status CodeDescription
200 OKIs returned if the request has been processed successfully.
500 Internal Server ErrorIs returned if an unexpected error occurred while handling the request.

Connection Status

This endpoint retrieves the connection status of the components used by the a9s CF Service Guard.

Request

Route

GET /v1/status

cURL

curl -u "${username}:${password}" "${url}/v1/status"

Response

Body

For success responses, the following fields are defined:

Response FieldTypeDescription
cloud_foundrystringok when the configured CF is reachable, failed otherwise.
service_brokersarray of service broker objectsA list of configured a9s Service Brokers and their respective status, the schema is defined below.
databasestringok when database is reachable, failed otherwise.

Service Broker Object

Response FieldTypeDescription
api_endpointstringThe API of the a9s Service Broker.
statusstringok when the a9s Service Broker is reachable, failed otherwise.

Example:

{
"cloud_foundry": "ok",
"service_brokers": [
{
"api_endpoint": "https://broker1.example.com:3001",
"status": "ok"
},
{
"api_endpoint": "http://broker2.example.com:3000",
"status": "failed"
}
],
"database": "ok"
}

For error responses, the following fields are defined:

Response FieldTypeDescription
errorstringA single word, in camel case, that uniquely identifies the error condition.
descriptionstringA user-facing error message explaining why the request failed.

Status

Status CodeDescription
200 OKIs returned if the request has been processed successfully.
401 UnauthorizedIs returned if the the authentication fails.
500 Internal Server ErrorIs returned if an unexpected error occurred while handling the request.