API Stability Long-Term

The createReadonlyToken() GraphQL mutation may be used to create a new sharable link to a LogScale dashboard.

For more information on access tokens of various types, see the Ingest Tokens documentation page. For information on user authorization, see the Manage users & permissions documentation page.

Syntax

Below is the syntax for the createReadonlyToken() mutation field:

graphql
createReadonlyToken(
      id: string!
      name: string!
      ipFilterId: string,
      queryOwnershipType: QueryOwnershipType
   ): DashboardLink!

For the id, the unique identifier of the dashboard should be given. Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  createReadonlyToken(
        id: "X3ax4M65ZyyRRd12MytBLifzoCmT5cK0",
        name: "reader-token",
        queryOwnershipType: Organization
      )
  { token }
}
Example Responses
Show:
json
{
  "data": {
    "createReadonlyToken": {
      "token": "Srme9n2tb1Sko6tilBO8JWAH"
    }
  }
}

The queryOwnershipType is for giving the ownership of the queries run by this shared dashboard.

Given Datatypes

QueryOwnershipType is an enumerated list of choices. They're listed below:

Table: QueryOwnershipType

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 16, 2024
Organizationboolean  Long-TermQueries run on behalf of the organization.
Userboolean  Long-TermQueries run on behalf of the user.

Returned Datatypes

The returned datatype DashboardLink has a few parameters. Below is a list of them: