List all services (GET /v1/services)
Lists services available in your project. To list information about a specific service, execute the retrieve a service API.
Items in the undeployed state are also included in the response.
The table below lists the main status codes and X-Message header values.
Status code | X-Message header |
---|---|
200 | Success: Completed successfully |
200 | No services to return: No services (empty list) |
Request Headers
Refer to "Common API request headers" for details.
Request Parameters
None.
Response Headers
Refer to "Common API response headers" for details.
Response Elements
services
Services
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..n | None | id, status, links |
id
The service_id indicating the service
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..1 | services | None |
status
Status information. Refer to the X-Status response header.
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..1 | services | None |
access-log-status
Status information. Refer to the X-Access-Log-Status response header.
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..1 | services | None |
links
Container for the child elements
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..1 | services | rel, href |
href
Service FQDN. Refer to X-Access-URL.
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..1 | links | None |
rel
URL including service_id. Refer to the Location header.
Data Type | Cardinality | Parent Element | Child Element(s) |
---|---|---|---|
String | 1..1 | links | None |
Example of Response
When 2 services are available on the project:
GET /v1/services
HTTP/1.1 200 OK
X-Message: Success
Content-Type: application/json
Content-Length: 442
{
"services": [
{
"access_log_status": "undeployed",
"id": "36adedf4-2370-476c-b531-3913b9502fe7",
"links": {
"href": "ct.list.00002.net",
"rel": "https://<Endpoint>/v1/services/36adedf4-2370-476c-b531-3913b9502fe7"
},
"status": "deployed"
},
{
"access_log_status": "undeployed",
"id": "a71170d3-b95e-4182-9918-687e327792bf",
"links": {
"href": "ct.list.00003.net",
"rel": "https://<Endpoint>/v1/services/a71170d3-b95e-4182-9918-687e327792bf"
},
"status": "deployed"
}
]
}
When no services are available on the project:
GET /v1/services
HTTP/1.1 200 OK
Date: Fri, 30 Oct 2015 00:11:44 GMT
X-Message: No services to return
Content-Type: application/json
Content-Length: 16
{
"services": []
}