Services

List Services

GET /api/v0/services

Required permissions for the API key

  • Read

Response

{
  "services": [<service>, <service>, ...]
}

<service> is an object that holds the following keys.

KEY TYPE DESCRIPTION
name string Name of the service.
memo string Notes related to this service. Can be edited from the web UI.
roles array[string] Array of role names belonging to the Service.

Arrays will be shown in the order of Role names.


Register Services

POST /api/v0/services

Required permissions for the API key

  • Read
  • Write

Input

KEY TYPE DESCRIPTION
name string Name of the service.
memo string Notes related to the service.

About the service name

Usable characters for the service name include the alphabet (A - Za - z), numbers (0 - 9), hyphens (-), and underscores (_). In addition, the name must be within 2 to 63 characters and hyphens and underscores can not be used at the beginning.

Also, you can not create multiple services with the same name in one organization.

Example input

{
  "name": "ExampleService",
  "memo": "This is an example."
}

Response

The created service will be returned. The format will be the same as <service> objects of the Service list API.

Success

{
    "name": <serviceName>,
    "memo": <memo>,
    "roles": []
}
KEY TYPE DESCRIPTION
name string Name of the service.
memo string Notes related to the service.
roles array[string] Array of role names belonging to the service.

Error

STATUS CODE DESCRIPTION
400 when the <serviceName> does not meet the above constraints
403 when the API key doesn't have the necessary permissions / when accessing from outside the authorized IP address range

Delete Services

DELETE /api/v0/services/<serviceName>

Roles, service metrics, monitoring configurations, and graph annotations associated with the service will also be deleted.

Required permissions for the API key

  • Read
  • Write

Response

The state of the service just before being deleted will be returned.

Success

{
    "name": <serviceName>,
    "memo": <memo>,
    "roles": [<roleName>, <roleName>, ...]
}
KEY TYPE DESCRIPTION
name string Name of the service.
memo string Notes related to the service.
roles array[string] Array of role names belonging to the service.

Arrays will be shown in the order of Role names.

Error

STATUS CODE DESCRIPTION
404 when the Service corresponding to <serviceName> can't be found
403 when the API key doesn't have the necessary permissions / when accessing from outside the authorized IP address range

List Roles

GET /api/v0/services/<serviceName>/roles

Required permissions for the API key

  • Read

Response

Success

{
  "roles": [<role>, <role>, ...]
}

<role> is an object that holds the following keys.

KEY TYPE DESCRIPTION
name string Name of the role.
memo string Notes related to this role. Can be edited from the web UI.

Arrays will be shown in the order of Role names.

Error

STATUS CODE DESCRIPTION
404 when the Service corresponding to <serviceName> can't be found

Register Roles

POST /api/v0/services/<serviceName>/roles

Required permissions for the API key

  • Read
  • Write

Input

KEY TYPE DESCRIPTION
name string Name of the role.
memo string Notes related to this role.

About the role name

Usable characters for the role name include the alphabet (A - Za - z), numbers (0 - 9), hyphens (-), and underscores (_). In addition, the name must be within 2 to 63 characters and hyphens and underscores can not be used at the beginning.

Also, you can not create multiple roles with the same name in one service.

Example input

{
  "name": "ExampleRole",
  "memo": "This is an example."
}

Response

The created role will be returned. The format will be the same as <role> objects of the Role list API.

Success

{
    "name": <roleName>,
    "memo": <memo>
}
KEY TYPE DESCRIPTION
name string Name of the role.
memo string Notes related to this role. Can be edited from the web UI.

Error

STATUS CODE DESCRIPTION
404 when the Service corresponding to <serviceName> can't be found
400 when the <roleName> does not meet the above constraints
403 when the API key doesn't have the necessary permissions / when accessing from outside the authorized IP address range

Delete Roles

DELETE /api/v0/services/<serviceName>/roles/<roleName>

Required permissions for the API key

  • Read
  • Write

Response

The state of the role just before being deleted will be returned.

Success

{
    "name": <roleName>,
    "memo": <memo>
}
KEY TYPE DESCRIPTION
name string Name of the role.
memo string Notes related to this role.

Error

STATUS CODE DESCRIPTION
404 when the service/role corresponding to <serviceName>/<roleName> can't be found
403 when the API key doesn't have the necessary permissions / when accessing from outside the authorized IP address range

List Metric Names

GET /api/v0/services/<serviceName>/metric-names

Required permissions for the API key

  • Read

Response

Success

{
  "names": [<metricName>, <metricName>, ...]
}
KEY TYPE DESCRIPTION
names array[string] The name of the metrics being posted in the service.

Error

STATUS CODE DESCRIPTION
404 when the Service corresponding to <serviceName> can't be found