Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Jul 8, 2025

Get started with the Guard Detect GraphQL API

You can extend the power of Guard Detect by integrating directly with the Atlassian platform GraphQL API. The API gives you access to all sorts of Atlassian data, so you can receive and manage alerts outside of Guard Detect.

The GraphQL API reference provides a comprehensive guide to Guard Detect queries and mutations. You can use the API explorer to get acquainted with the GraphQL API.

Authentication

Refer to the GraphQL authentication reference for all the available authentication options.

User API tokens can also be used to authenticate scripts and simple integrations. These clients use the https://api.atlassian.com/graphql URL. You can generate the token from your Atlassian account. Read how to Manage API tokens for your Atlassian account

If you don’t use a token to authenticate, you may see a redirection message, which will redirect you to an alternative interface where browser sessions are supported.

Service account API credentials can be leveraged for long-term integrations as they are not linked directly to a particular Guard Detect user. Read how to Manage API tokens for a service account

When using service accounts to integrate with Guard Detect, grant the User and Admin user roles on the Guard Detect app to the service account.

Scoped API tokens can also be used to increase security by limiting the operations a token can perform on the ARI. Guard Detect supports the following scopes:

ScopeDescription
read:alert:guard-detectRead alerts and their details. Example: can be used by the Guard Detect Add-on for Splunk and other tools to fetch latest alerts.
write:alert:guard-detectUpdate some alert fields. Example: update alert status.
read:detection:guard-detectRead the list of detectors.
write:detection:guard-detectCreate and update custom detectors.
read:detection-setting:guard-detectRead detection configuration settings.
write:detection-setting:guard-detectModify detection configuration. Example: enable or disable detections, add or remove exclusions.
read:subscription:guard-detectRead subscriptions to WebHooks, Slack, and MS Teams.
write:subscription:guard-detectUpdate or delete subscriptions to WebHooks, Slack, and MS Teams.
write:redaction:guard-detectRedact content, individual and in bulk.
write:restoration:guard-detectRestore previously-redacted content.

Refer to the GraphQL reference for the available queries and mutations and the scopes they require.

Atlassian resource identifiers

Most GraphQL queries require an Atlassian resource identifier (ARI). If you’re not sure how to assemble your ARI or where to find your Atlassian IDs, visit our Build your ARI page.

Example GraphQL query

To get you started, here's an example query that fetches data about a Guard Detect workspace.

  1. Open the API explorer

  2. Paste this code into the main query window:

    1
    2
    query getWorkspace($workspaceAri: ID!) {
      shepherd {
        workspace(id: $workspaceAri) {
          __typename
          ... on ShepherdWorkspaceConnection {
            edges {
              node {
                ... on ShepherdWorkspace {
                  id
                }
              }
            }
          }
        }
      }
    }
    

    Note that Shepherd is an internal name for Guard Detect functionality.

  3. In the query variables window, paste this code:

    1
    2
    { "workspaceAri": "your-workspace-ari-here" }
    
  4. Replace the string your-workspace-ari-here with your workspace ARI.

  5. Press the execute query button (triangle icon) at the top of the screen. Details about your workspace will appear in the panel on the right. The GraphQL API explorer window with example code.

Need help? Reach out on the Guard Detect community.

Rate this page: