Skip to content
Release: Australia · Updated: 2026-06-18 · Official documentation · View source

Integrate Grafana with REST API key token

Integrate using an API key to establish secure communication and automate data exchange via REST API. This simplifies integration, enabling seamless access to services and enhancing operational efficiency.

Before you begin

Role required: evt_mgmt_integration

Procedure

  1. Navigate to All > System Web Services > API Access Policies > REST API Key.
Image omitted: em-rest-api-navigation.png
Rest API navigation
  1. Select New.

  2. On the form, fill the fields.

    Note: The user needs to be created with the evt_mgmt_integration role. Create a new one on the sys_user table to use here to facilitate the right access.

    FieldDescription
    NameName to identify the REST API Key
    DescriptionDescription for the REST API Key.
    ActiveStatus of the REST API Key.
    UserUser associated to the REST API Key. Use the look-up icon to select the user.
    Auth ScopeOption to add auth scope to manage the authority of the REST API Key.
    TokenThe REST API key generated by the ServiceNow AI Platform. Copy the key to use as part of the REST API call within the Header or Query parameter.
    ExpiryTime after which the credential is no longer valid. Empty value means no expiration.
  3. Unlock Auth Scope and add: UserAccount.

  4. Use the form menu and select Save.

    The system generates a token and saves it in the Token field. To see the token, use the lock icon and copy the contents display below the field. This is your query parameter (or header) value when your other system sends a REST API request to ServiceNow.

Image omitted: em-rest-api-token.png
Rest API token generated in the Token field.
  1. In Grafana, continue using the same webhook configuration and add the REST API key in one of the following ways:

    • Add x-sn-apikey=<rest_api_token> as a query parameter to the webhook URL.
    • Add x-sn-apikey as a header name and the REST API key as the header value. For example:
    https://<instance_name>.service-now.com/api/sn_em_connector/em/inbound_event?source=grafana&x-sn-apikey=<rest_api_token>
    

Parent Topic:Integrate Grafana events