IBM Cloud API Docs

Introduction

IBM Cloud® Monitoring is a cloud-native, container-intelligence management system that you can include as part of your IBM Cloud architecture. Use it to gain operational visibility into the performance and health of your applications, services, and platforms. It offers administrators, DevOps teams and developers full stack telemetry with advanced features to monitor and troubleshoot, define alerts, and design custom dashboards. For details about using IBM Cloud Monitoring, see the IBM Cloud docs.

You can use the Monitoring API to manage dashboards, alerts, and teams. For more information, see the following documentation:

You can use any of the following methods to manage the Monitoring service:

  • Python Client: You can use the Python client to manage the Monitoring service. The client is also known as the sdcclient. For more information, see Using the Python client.
  • cURL: You can use cURL, a command line tool, from a terminal to manage the Monitoring service by using URL syntax. For more information, see Using cURL.

Use the following syntax from a terminal to run a cURL command:

curl -X <METHOD> <ENDPOINT>/<API_URL> <-H HEADERS,> [-d DATA]

Where

  • <METHOD> indicates the type of REST API call that you want to make.
  • <ENDPOINT> indicates the endpoint where the monitoring instance is available. For more information, see Monitoring endpoints. For example, the endpoint for an instance that is available in us-south is the following: https://us-south.monitoring.cloud.ibm.com
  • <API_URL> For more information about API URLs, see Monitoring REST APIs.
  • HEADERS add additional information such as information to authenticate with the IBM Cloud Monitoring service.
  • DATA allows you to pass additional information that might be required.

The code examples on this tab use the client library that is provided for Python.

import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
from sdcclient import IbmAuthHelper, SdMonitorClient

# Parse arguments.
def usage():
   print('usage: %s <ENDPOINT_URL> <API_KEY> <INSTANCE_GUID>' % sys.argv[0])
   print('ENDPOINT_URL: IBM Cloud endpoint URL (e.g. https://us-south.monitoring.cloud.ibm.com')
   print('API_KEY: IBM Cloud IAM API key. This key is used to retrieve an IAM access token.')
   print('INSTANCE_GUID: GUID of an IBM Cloud Monitoring instance.')
   sys.exit(1)

if len(sys.argv) != 4:
   usage()

URL = sys.argv[1]
APIKEY = sys.argv[2]
GUID = sys.argv[3]


# Instantiate the client
ibm_headers = IbmAuthHelper.get_headers(URL, APIKEY, GUID)
sdclient = SdMonitorClient(sdc_url=URL, custom_headers=ibm_headers)

Endpoint URL

You can use public and private endpoints. To find out about the available endpoints, see REST API endpoints.

The endpoint for the IBM Cloud Monitoring API is in the format: https://cloud.ibm.com.monitoring.cloud.ibm.com/api For example, the API endpoint for Dallas is: https://us-south.monitoring.cloud.ibm.com/api

Example request to a Dallas endpoint:

curl -X GET https://us-south.monitoring.cloud.ibm.com/api/alerts/<ALERT_ID> -H "Authorization: $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "TeamID: $TEAM_ID" -H "content-type: application/json"

Replace <ALERT_ID>, AUTH_TOKEN, GUID and TEAM_ID in this example with the values for your particular API call.

Example request to a Dallas endpoint

import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
from sdcclient import IbmAuthHelper, SdMonitorClient

# Parse arguments.
def usage():
   print('usage: %s <ENDPOINT_URL> <API_KEY> <INSTANCE_GUID>' % sys.argv[0])
   print('ENDPOINT_URL: IBM Cloud endpoint URL (e.g. https://us-south.monitoring.cloud.ibm.com')
   print('API_KEY: IBM Cloud IAM API key. This key is used to retrieve an IAM access token.')
   print('INSTANCE_GUID: GUID of an IBM Cloud Monitoring instance.')
   sys.exit(1)

if len(sys.argv) != 4:
   usage()

URL = sys.argv[1]
APIKEY = sys.argv[2]
GUID = sys.argv[3]


# Instantiate the client
ibm_headers = IbmAuthHelper.get_headers(URL, APIKEY, GUID)
sdclient = SdMonitorClient(sdc_url=URL, custom_headers=ibm_headers)

Authentication

Access to IBM Cloud Monitoring is controlled by using IBM Cloud Identity and Access Management (IAM), which provides a unified approach to managing user identities and access control across your IBM Cloud services and applications.

This API requires IBM Cloud Identity and Access Management (IAM) authentication. You must pass an IAM token in the Authorization header of the request. You can retrieve your IAM access token, which is prefixed with Bearer, by running the ibmcloud iam oauth-tokens command. You must also set the Account header to the unique ID for your IBM Cloud account. You can retrieve your Account ID by running the ibmcloud account show command.

To call each method, you must be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Managing access for IBM Cloud Monitoring.

In a cURL command, add the following headers to authenticate with the IBM Cloud Monitoring service by using an IAM token:

-H "Authorization: $AUTH_TOKEN"
-H "IBMInstanceID: $GUID"
-H "TeamID: $TEAM_ID"

Where

  • IBMInstanceID indicates the GUID of the IBM Cloud Monitoring instance that you want to target with the cURL command.

    To get the GUID of the monitoring instance, run the following command: ibmcloud resource service-instance <NAME> --output json | jq -r '.[].guid'

  • Authorization indicates the IAM token that is used to authenticate with the IBM Cloud Monitoring service instance.

    To get the IAM AUTH_TOKEN token, run the following command: ibmcloud iam oauth-tokens | awk '{print $4}'

    For more information, see Getting the IAM API token.

  • TeamID indicates the GUID of a team.

    To get the GUID, see Getting the ID of a team.

Authentication when using Python

To use IBM Cloud IAM authentication with the Python client, you must specify an endpoint, an API key, and the GUID from your IBM Cloud Monitoring instance.

Complete the following steps from a terminal:

  1. Get the GUID of your IBM Cloud Monitoring instance. Run the following command:

    ibmcloud resource service-instance <NAME> --output json | jq -r '.[].guid'
    
  2. Get the API key. Run the following command to generate a user API key:

    ibmcloud iam api-key-create KEY_NAME
    
  3. Get the endpoint for the region where the monitoring instance is available.

  4. Add the following entries to your Python script:

    from sdcclient import IbmAuthHelper, SdMonitorClient
    
    URL = <ENDPOINT>
    # For example: URL = 'https://us-south.monitoring.cloud.ibm.com'
    
    APIKEY = <IAM_APIKEY>
    
    GUID = <GUID>
    
    ibm_headers = IbmAuthHelper.get_headers(URL, APIKEY, GUID)
    sdclient = SdMonitorClient(sdc_url=URL, custom_headers=ibm_headers)
    

    Where

    <ENDPOINT> must be replaced with the endpoint where the monitoring instance is available.

    <IAM_APIKEY> must be replaced with a valid IAM API key. Learn more.

    <GUID> must be replaced with the GUID of the monitoring instance that you obtain in the previous step.

You can now use the sdclient to perform actions that will be authenticated by using IAM.

If you get the error 400 Client Error: Bad Request for url: https://iam.cloud.ibm.com/identity/token, check the API key. The value that you are passing is not valid.

Auditing

You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method. For more information about how to track IBM Cloud Monitoring activity, see Auditing the events for IBM Cloud Monitoring.

Error handling

The IBM Cloud Monitoring service uses standard HTTP response codes to indicate whether a method completed successfully.

  • A 200 response always indicates success.
  • A 400 type response indicates a failure.
  • A 500 type response usually indicates an internal system error.
HTTP Error Code Description
200 Success
201 Success
E.g. Dashboard successfully created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
E.g. Dashboard V3 not active
422 Validation error, reason stated in the response body
500 Internal Server Error

Methods

List Teams

Retrieve a paginated list of teams.

Required permissions: customer-teams.read

GET /platform/v1/teams

Request

Query Parameters

  • The offset number of items to start with

    Possible values: 0 ≤ value ≤ 2147483647

    Default: 0

    Example: 30

  • The number of items to return

    Possible values: 1 ≤ value ≤ 200

    Default: 25

    Example: 25

  • The order by field separated by a colon for the direction

    Possible values: length ≤ 256

    Default:

    Example: name:asc

  • The filter by field separated by a colon for the filter value

    Possible values: length ≤ 8192

    Default:

    Example: name:filter

Response

Status Code

  • The teams page.

  • Operation failed due to invalid payload.

  • Access denied.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Create Team

Create a new team.

Required permissions: teams.create

POST /platform/v1/teams

Request

The payload required to create a new team.

Response

Status Code

  • Team created.

  • Operation failed due to invalid payload.

  • Access denied.

  • Conflict.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Conflict",
      "type": "conflict"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Delete Team

Delete a team by its ID.

Required permissions: teams.edit

DELETE /platform/v1/teams/{teamId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Team deleted.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Get Team

Return a team by ID.

Required permissions: customer-teams.read

GET /platform/v1/teams/{teamId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Team found.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Update Team

Update a team by its ID.

Required permissions: teams.edit

PUT /platform/v1/teams/{teamId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Team updated.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Conflict.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Conflict",
      "type": "conflict"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

List Memberships

Retrieve a paginated list of memberships in a given team ID.

Required permissions: memberships.read

GET /platform/v1/teams/{teamId}/users

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Query Parameters

  • The offset number of items to start with

    Possible values: 0 ≤ value ≤ 2147483647

    Default: 0

    Example: 30

  • The number of items to return

    Possible values: 1 ≤ value ≤ 200

    Default: 25

    Example: 25

Response

Status Code

  • The memberships page.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Delete Membership

Delete a membership defined by its ID.

Required permissions: memberships.edit

DELETE /platform/v1/teams/{teamId}/users/{userId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

  • The user ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Membership deleted.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Get Membership

Return a membership by its ID.

Required permissions: memberships.read

GET /platform/v1/teams/{teamId}/users/{userId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

  • The user ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Membership found.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Save Membership

Add or update a membership.

| Permission | Description | | -----------------------| --------------------------------------------------------------------------------------------------------| | memberships.edit | Required to create a new membership. | | memberships-roles.edit | Required to change roles of an existing membership or to create a new membership with a specific role. |

PUT /platform/v1/teams/{teamId}/users/{userId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

  • The user ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Membership updated.

  • Membership created.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Server cannot accept content of type specified in Content-Type header.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

List Access Keys

Retrieve a paginated list of access keys.

Required permissions: customer-access-keys.read

GET /platform/v1/access-keys

Request

Query Parameters

  • The offset number of items to start with

    Possible values: 0 ≤ value ≤ 2147483647

    Default: 0

    Example: 30

  • The number of items to return

    Possible values: 1 ≤ value ≤ 200

    Default: 25

    Example: 25

  • The order by field separated by a colon for the direction

    Possible values: length ≤ 256

    Default:

    Example: name:asc

  • Filters to apply in the form of key:value.
    Multiple filters can be applied by repeating the filter parameter:
    &filter=key1:value1&filter=key2:value2

    Possible values: number of items ≤ 4, length ≤ 512

    Default: []

Response

Status Code

  • The access keys page.

  • Operation failed due to invalid payload.

  • Access denied.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Create Access Key

Create a new access key.

Required permissions: customer-access-keys.edit

POST /platform/v1/access-keys

Request

Create access key request

Response

Access key response

Status Code

  • Access key created.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Conflict.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Conflict",
      "type": "conflict"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Delete Access Key

Delete an access key by id.

Required permissions: customer-access-keys.edit_

DELETE /platform/v1/access-keys/{accessKeyId}

Request

Path Parameters

  • The access key id.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Access key deleted.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Get Access Key

Return an access key by id.

Required permissions: customer-access-keys.read

GET /platform/v1/access-keys/{accessKeyId}

Request

Path Parameters

  • The access key id.

    Possible values: value ≥ 0

    Example: 1

Response

Access key response

Status Code

  • Access key found.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Update Access Key

Update an access key by id.

Required permissions: customer-access-keys.edit

PUT /platform/v1/access-keys/{accessKeyId}

Request

Path Parameters

  • The access key id.

    Possible values: value ≥ 0

    Example: 1

Update access key request

Response

Access key response

Status Code

  • Access key updated.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Conflict.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Conflict",
      "type": "conflict"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Delete Service Accounts Notification Settings

Delete Service Accounts Notification Settings for a given team.

Required permissions: service-accounts-notification-settings.edit

DELETE /platform/v1/teams/{teamId}/service-accounts/notification-settings

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Service Accounts Notification Settings deleted.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Get Service Accounts Notification Settings

Return Service Accounts Notification Settings for a given team.

Required permissions: service-accounts-notification-settings.read

GET /platform/v1/teams/{teamId}/service-accounts/notification-settings

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Response

The base schema for the service accounts notification settings.

Status Code

  • Service Accounts Notification Settings found.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Create Service Accounts Notification Settings

Create a new Notification Settings for Service Accounts which belong to a specific team.

Required permissions: service-accounts-notification-settings.edit

POST /platform/v1/teams/{teamId}/service-accounts/notification-settings

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

The payload required to create Service Accounts Notification Settings.

Response

The base schema for the service accounts notification settings.

Status Code

  • Service Accounts Notification Settings created.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Update Service Accounts Notification Settings

Update Service Accounts Notification Settings for a given team.

Required permissions: service-accounts-notification-settings.edit

PUT /platform/v1/teams/{teamId}/service-accounts/notification-settings

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

The base schema for the service accounts notification settings.

Response

The base schema for the service accounts notification settings.

Status Code

  • Service Accounts Notification Settings updated.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Server cannot accept content of type specified in Content-Type header.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

List Team Service Accounts

Retrieve a paginated list of team service accounts.

Required permissions: team-service-accounts.read

GET /platform/v1/teams/{teamId}/service-accounts

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

Query Parameters

  • The offset number of items to start with

    Possible values: 0 ≤ value ≤ 2147483647

    Default: 0

    Example: 30

  • The number of items to return

    Possible values: 1 ≤ value ≤ 200

    Default: 25

    Example: 25

  • The order by field separated by a colon for the direction

    Possible values: length ≤ 256

    Default:

    Example: name:asc

  • Filters to apply in the form of key:value.
    Multiple filters can be applied by repeating the filter parameter:
    &filter=key1:value1&filter=key2:value2

    Possible values: number of items ≤ 4, length ≤ 512

    Default: []

Response

Status Code

  • The team service accounts page.

  • Operation failed due to invalid payload.

  • Access denied.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Create a Team Service Account

Create a new team service account.

Required permissions: team-service-accounts.edit

POST /platform/v1/teams/{teamId}/service-accounts

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

The payload required to create a new team service account.

Response

Status Code

  • Team service account created.

  • Operation failed due to invalid payload.

  • Access denied.

  • Conflict.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Conflict",
      "type": "conflict"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Delete a Team Service Account

Delete a team service account by ID.

Required permissions: team-service-accounts.edit

DELETE /platform/v1/teams/{teamId}/service-accounts/{serviceAccountId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

  • The service account ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Team service account deleted.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Not found.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Get a Team Service Account

Return a team service account by ID.

Required permissions: team-service-accounts.read

GET /platform/v1/teams/{teamId}/service-accounts/{serviceAccountId}

Request

Path Parameters

  • The team ID.

    Possible values: value ≥ 0

    Example: 1

  • The service account ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Team service account found.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

List Inhibition Rules

Retrieve the list of inhibition rules.

Required permissions: inhibition-rules.read or alerts.read

GET /monitor/alerts/v1/inhibition-rules

Request

Query Parameters

  • The offset number of items to start with

    Possible values: 0 ≤ value ≤ 2147483647

    Default: 0

    Example: 30

  • The number of items to return

    Possible values: 1 ≤ value ≤ 200

    Default: 25

    Example: 25

Response

Status Code

  • The list of inhibition rules.

  • Operation failed due to invalid payload.

  • Access denied.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Create Inhibition Rule

Create an inhibition rule.

Required permissions: inhibition-rules.edit or alerts.edit

POST /monitor/alerts/v1/inhibition-rules

Request

The inhibition rule to be created.

Response

Status Code

  • Inhibition rule created.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not enough privileges to complete the action.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Forbidden",
      "type": "forbidden"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Delete Inhibition Rule

Delete an inhibition rule by its ID.

Required permissions: inhibition-rules.edit or alerts.edit

DELETE /monitor/alerts/v1/inhibition-rules/{inhibitionRuleId}

Request

Path Parameters

  • The inhibition rule ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Inhibition rule deleted.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Get Inhibition Rule

Retrieve an inhibition rule by ID.

Required permissions: inhibition-rules.read or alerts.read

GET /monitor/alerts/v1/inhibition-rules/{inhibitionRuleId}

Request

Path Parameters

  • The inhibition rule ID.

    Possible values: value ≥ 0

    Example: 1

Response

Status Code

  • Inhibition rule found.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Update Inhibition Rule

Update an inhibition rule.

Required permissions: inhibition-rules.edit or alerts.edit

PUT /monitor/alerts/v1/inhibition-rules/{inhibitionRuleId}

Request

Path Parameters

  • The inhibition rule ID.

    Possible values: value ≥ 0

    Example: 1

The new version of the inhibition rule.

Response

Status Code

  • Inhibition rule updated.

  • Operation failed due to invalid payload.

  • Access denied.

  • Not found.

  • Conflict.

  • Server cannot accept content of type specified in Content-Type header.

  • Server was unable to process the request.

  • Too many requests.

  • Internal server error.

Example responses
  • {
      "details": [],
      "message": "Bad request",
      "type": "bad_request"
    }
  • {
      "details": [],
      "message": "Unauthorized",
      "type": "unauthorized"
    }
  • {
      "details": [],
      "message": "Resource not found",
      "type": "resource_not_found"
    }
  • {
      "details": [],
      "message": "Conflict",
      "type": "conflict"
    }
  • {
      "details": [],
      "message": "Unsupported media type",
      "type": "unsupported_media_type"
    }
  • {
      "details": [],
      "message": "Unprocessable content",
      "type": "unprocessable_content"
    }
  • {
      "details": [],
      "message": "Too many requests",
      "type": "too_many_requests"
    }
  • {
      "details": [],
      "message": "Internal server error",
      "type": "internal_server_error"
    }

Creates a new dashboard

POST /api/v3/dashboards

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Response

Status Code

  • Dashboard successfully created

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Convert Dashboard V2 into a Dashboard V3

POST /api/v3/dashboards/convertV2

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • Dashboard successfully converted to V3

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Convert Dashboard V2 Widgets into DashboardV3Panels

POST /api/v3/dashboards/convertWidgets

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • Dashboard widgets successfully converted

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Transfer the ownership of a set of dashboards to another user

POST /api/v3/dashboards/transfer

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Transfer of ownership for a dashboard

Response

Status Code

  • Simulation result of transfer if specified. Otherwise dashboards successfully transferred to the new user

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

  • Invalid owner or target owner

No Sample Response

This method does not specify any sample responses.

Get a single dashboard by id

GET /api/v3/dashboards/{id}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Path Parameters

Response

Status Code

  • Dashboard V3

  • Unauthorized

  • The user has no permissions to access the given dashboard. It may include a list of sharing teams which the user can access the dashboard from

  • Dashboard not found for the customer

No Sample Response

This method does not specify any sample responses.

Update a given dashboard

PUT /api/v3/dashboards/{id}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Path Parameters

Response

Status Code

  • Dashboard successfully updated

  • Created

  • Unauthorized

  • The user has no permissions to update the given dashboard

  • Dashboard not found for the customer

  • Dashboard V3 version not matching the current stored version

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Delete a given dashboard

DELETE /api/v3/dashboards/{id}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Path Parameters

Response

Status Code

  • Dashboard successfully deleted

  • No Content

  • Unauthorized

  • The user has no permissions to delete the given dashboard

  • Dashboard not found for the customer

No Sample Response

This method does not specify any sample responses.

Set/Unset the dashboard as favorite for the current user

PATCH /api/v3/dashboards/{id}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Path Parameters

Response

Status Code

  • Dashboard favorite successfully updated

  • No Content

  • Unauthorized

  • The user has no permissions to update the given dashboard

  • Dashboard not found for the customer

No Sample Response

This method does not specify any sample responses.

Get dashboard sharing teams

GET /api/v3/dashboards/{id}/sharing

Request

Path Parameters

Response

Status Code

  • Dashboard V3

  • Unauthorized

  • Forbidden

  • Dashboard not found for the customer

No Sample Response

This method does not specify any sample responses.

List all dashboards accessible by the user in light mode with or without panels depending on content type

GET /api/v3/dashboards?content{&autoCreated,content,requiredPermission,shared,team}

Request

Query Parameters

  • Include list of panels for every dashboard

    Allowable values: [simpleList,searchInfo]

  • Only auto created dashboards (deprecated param)

    Default: false

  • Only dashboards with the specific permission

    Allowable values: [dashboards.read,dashboards.edit,dashboards.delete,dashboards.sharing,dashboards.transfer]

  • Only dashboards shared to other users

    Default: false

  • Return dashboards for the given team id. Otherwise for the current user's team

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

List all dashboards accessible by the user in light mode without panels and layout

GET /api/v3/dashboards?light=true{&autoCreated,content,light,requiredPermission,shared,team}

Request

Query Parameters

  • Only auto created dashboards (deprecated param)

    Default: false

  • Include list of panels for every dashboard

    Default: simpleList

  • Only dashboards with the specific permission

    Allowable values: [dashboards.read,dashboards.edit,dashboards.delete,dashboards.sharing,dashboards.transfer]

  • Only dashboards shared to other users

    Default: false

  • Return dashboards for the given team id. Otherwise for the current user's team

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

List all dashboards accessible for the user

GET /api/v3/dashboards{?autoCreated,shared,team}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Query Parameters

  • Only auto created dashboards

    Default: false

  • Only shared dashboards

    Default: false

  • Return dashboards for the given team id

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Bulk delete a set of dashboards

POST /api/v3/dashboards/bulk/delete

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • Bulk delete operation completed

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Bulk set dashboards as Favorite

POST /api/v3/dashboards/bulk/favorite/set

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • Bulk set as favorite operation completed

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Bulk unset dashboards as Favorite

POST /api/v3/dashboards/bulk/favorite/unset

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • Bulk unset as favorite operation completed

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

List all dashboards accessible by the user including custom, shared and libraries. Displays also favourites, recently viewed and most recent

GET /api/v3/dashboards/list{?mostPopular,recentlyViewed}

Request

Query Parameters

  • Return the max N most popular dashboards for team a user is member of

    Default: 5

  • Return the max N most recently viewed dashboards for the user in the team

    Default: 10

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Get all the Silencing Rule belonging to the current logged user

GET /api/v1/silencingRules

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Response

Silencing rule definition

Status Code

  • Success

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Create a new Silencing Rule

POST /api/v1/silencingRules

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Silencing rule definition

Response

Silencing rule definition

Status Code

  • Silencing Rule successfully created

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Delete all the requested Silencing Rules

POST /api/v1/silencingRules/delete

Request

Bulk request wrapper object

Response

Status Code

  • Created

  • Silencing Rules successfully deleted.

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Disable all the requested Silencing Rules

PATCH /api/v1/silencingRules/disable

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Bulk request wrapper object

Response

Response wrapper object

Status Code

  • Silencing Rules successfully disabled. All the disabled rules are returned in the response body

  • No Content

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Enable all the requested Silencing Rules

PATCH /api/v1/silencingRules/enable

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Bulk request wrapper object

Response

Response wrapper object

Status Code

  • Silencing Rules successfully enabled. All the enabled silencingRules are returned in the response body

  • No Content

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Get a single Silencing Rule by id

GET /api/v1/silencingRules/{silencingRuleId}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Path Parameters

  • The rule ID to fetch

Response

Silencing rule definition

Status Code

  • Success

  • Unauthorized

  • Forbidden

  • Silencing Rule not found for the customer/team

No Sample Response

This method does not specify any sample responses.

Update a Silencing Rule by id

PUT /api/v1/silencingRules/{silencingRuleId}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Path Parameters

Silencing rule definition

Response

Silencing rule definition

Status Code

  • Silencing Rule successfully updated

  • Created

  • Unauthorized

  • Forbidden

  • Silencing Rule not found for customer/team

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Delete a Silencing Rule by id

DELETE /api/v1/silencingRules/{silencingRuleId}

Request

Path Parameters

  • The rule ID to delete

Response

Status Code

  • Silencing Rule successfully deleted

  • No Content

  • Unauthorized

  • Forbidden

  • Silencing Rule not found for the customer/team

No Sample Response

This method does not specify any sample responses.

Creates an alert

POST /api/v2/alerts

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Alert V2 Wrapper

Response

Alert V2 Wrapper

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Bulk create alerts

POST /api/v2/alerts/bulk

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Creates an alert. Note: This endpoint is deprecated in favour of the canonical root endpoint

POST /api/v2/alerts/create

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Alert V2 Wrapper

Response

Alert V2 Wrapper

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Delete all the requested Alerts

POST /api/v2/alerts/delete

Request

Bulk alert request object

Response

Status Code

  • Created

  • Alerts successfully deleted.

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Disable all the requested Alerts

PATCH /api/v2/alerts/disable

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Query Parameters

  • Notification resolution strategy

    Allowable values: [DO_NOT_NOTIFY,SEND_ACKNOWLEDGED_NOTIFICATIONS,SEND_RESOLUTION_NOTIFICATIONS]

    Default: SEND_ACKNOWLEDGED_NOTIFICATIONS

Bulk alert request object

Response

Status Code

  • Alerts successfully disabled. All the disabled alerts are returned in the response body

  • No Content

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Enable all the requested Alerts

PATCH /api/v2/alerts/enable

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

  • Allowable values: [*/*,application/json]

Bulk alert request object

Response

Status Code

  • Alerts successfully enabled. All the enabled alerts are returned in the response body

  • No Content

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Given an alert configuration, generates the corresponding PromQL query

POST /api/v2/alerts/generateQuery

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Alert V2 Wrapper

Response

Status Code

  • Alert promQL condition generated successfully

  • Created

  • When it's not possible to generate the PromQL query for the given alert, please check the error message in the response

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Retrieve group names

GET /api/v2/alerts/groups{?filter}

Request

Query Parameters

  • filter to use when searching for groups

Response

Status Code

  • Group list successfully retrieved

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Resolve events associated with all the requested Alerts

PATCH /api/v2/alerts/resolve

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Query Parameters

  • Notification resolution strategy

    Allowable values: [DO_NOT_NOTIFY,SEND_RESOLUTION_NOTIFICATIONS]

Bulk alert request object

Response

Status Code

  • Events successfully resolved

  • No Content

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Restore all the requested Alerts

PATCH /api/v2/alerts/restore

Request

Bulk alert request object

Response

Status Code

  • Alerts successfully restored.

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

List alerts

GET /api/v2/alerts/summary{?aggregatedEventsMs,alertStatus,deleted,direction,excludePolicyEvents,filter,ids,severities,sortBy,statuses,triggeredAlertsScope,view}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Query Parameters

  • Milliseconds used to aggregate events if requested

  • Alert statuses (states or resolutions) to include when aggregating events and when searching for triggered alerts

    Possible values: contains only unique items

  • Alert deletion flag (true if deleted, false if not)

    Default: false

  • Direction of sorting

    Allowable values: [asc,desc]

    Default: desc

  • Exclude Secure events

    Default: true

  • String filter to use when querying alerts

  • List of alert IDs to list

  • List of severities to use when filtering

  • Property used for sorting

    Default: id

  • List of statuses to use when filtering

  • Scope of triggered alerts

  • View filter for alerts list

    Allowable values: [TRIGGERED,UNREPORTED_DESCRIPTORS,DEACTIVATED]

Response

Status Code

  • All the teams alerts, already enriched with notification channels. Alerts are returned in the response body

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Get alert

GET /api/v2/alerts/{alertId}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Path Parameters

  • ID of the alert to fetch

Response

Alert V2 Wrapper

Status Code

  • Alert was found

  • Unauthorized

  • Forbidden

  • When the alert does not exists or cannot be read by the user

No Sample Response

This method does not specify any sample responses.

Update alert

PUT /api/v2/alerts/{alertId}

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

Alert V2 Wrapper

Response

Status Code

  • The update operation was successful

  • Created

  • Invalid request, reason stated in the response body

  • Unauthorized

  • Forbidden

  • The selected alert was not found

  • A version conflict occurred while updating

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Delete alert

DELETE /api/v2/alerts/{alertId}

Request

Path Parameters

Response

Status Code

  • The delete operation was successful

  • Unauthorized

  • Forbidden

  • The selected alert was not found

No Sample Response

This method does not specify any sample responses.

Edit alert

PATCH /api/v2/alerts/{alertId}

Request

Path Parameters

Response

Status Code

  • The restore operation was successful

  • Unauthorized

  • Forbidden

  • The selected alert was not found

No Sample Response

This method does not specify any sample responses.

List alerts

GET /api/v2/alerts{?aggregatedEventsMs,alertStatus,deleted,direction,excludePolicyEvents,filter,ids,severities,sortBy,statuses,triggeredAlertsScope,view}

Request

Custom Headers

  • Optional boolean header. Performs translation of metrics and labels into prometheus/public notation

Query Parameters

  • Milliseconds used to aggregate events if requested

  • Alert statuses (states or resolutions) to include when aggregating events and when searching for triggered alerts

    Possible values: contains only unique items

  • Alert deletion flag (true if deleted, false if not)

    Default: false

  • Direction of sorting

    Allowable values: [asc,desc]

    Default: desc

  • Exclude Secure events

    Default: true

  • String filter to use when querying alerts

  • List of alert IDs to list

  • List of severities to use when filtering

  • Property used for sorting

    Default: id

  • List of statuses to use when filtering

  • Scope of triggered alerts

  • View filter for alerts list

    Allowable values: [TRIGGERED,UNREPORTED_DESCRIPTORS,DEACTIVATED]

Response

Status Code

  • All the teams alerts, already enriched with notification channels. Alerts are returned in the response body

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Creates a custom event

POST /api/v2/events

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Get events count aggregated by time and severity

Computes an aggregated count of Sysdig Monitor events in a specific time interval, with the possibility to filter events based on a textual query (according to the search syntax and searched fields for events), a scope, the type and source of the event and the severity. Alert events can also be filtered by alert state and/or acknowledgement status. Unless filtered by type using the category parameter, this endpoint will take into account all the available event types. Results are presented as a list of event count aggregated by the sampling interval and subsequently aggregated by event severity. This endpoint is used to support the Display of Dashboard-Specific Events.

POST /api/v2/events/count

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Parameters to control the event count

Response

Status Code

  • The events count

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

Update a custom event

PUT /api/v2/events/{id}

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Identifier of the event to update

Response

Status Code

  • Event has been successfully updated

  • Created

  • Unauthorized

  • Forbidden

  • Event was not found

  • The update request contains errors. Details are provided in the response body

No Sample Response

This method does not specify any sample responses.

Delete an event

DELETE /api/v2/events/{id}

Request

Path Parameters

  • Identifier of the event to delete

Response

Status Code

  • Event has been successfully deleted

  • Unauthorized

  • Forbidden

  • Event was not found

No Sample Response

This method does not specify any sample responses.

Resolve an alert event

PATCH /api/v2/events/{id}/resolve

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

Query Parameters

  • Optional boolean parameter. Performs translation of labels into prometheus/public notation. Only applies if translation of metrics into prometheus/public notation is also requested

    Default: false

Response

Status Code

  • Event has been successfully resolved

  • No Content

  • Unauthorized

  • Forbidden

  • Event was not found

  • Validation error, reason stated in the response body

No Sample Response

This method does not specify any sample responses.

id=curlclassName=tab-item-selected