API Stability Long-Term

The createViewPermissionsToken() GraphQL mutation field will create a view permission token to use with LogScale. The permissions will take effect across all of the views.

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. You may also want to look at the Creating a Repository or View page for related information.

Syntax

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

graphql
createViewPermissionsToken(
      input: CreateViewPermissionsTokenInput!
   ): string!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  createViewPermissionsToken(input:
        { name: "reader-token",
          expireAt: null,
          viewIds: [ "aK9GKAsTnMXfRxT8Fpecx3fX",
                     "N7t1bAn6xWMsWjVptueeNR16" ],
          permissions: [ ReadAccess ]
        } )
}
Example Responses
Show:
json
{
  "data": {
    "createViewPermissionsToken": "ciQrkii7NJtUmtr6N8JQRoLCyuE4nKdT~06PKerqjTkLt6cITyDEvIHnYk82BgOOkof6NrMQMkFOX"
  }
}

Given Datatypes

CreateViewPermissionsTokenInput has a few parameters that may be given. Below is a list of them along with descriptions of each:

Table: CreateViewPermissionsTokenInput

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: Nov 29, 2024
expireAtlong  Long-TermWhen the permission token will expire.
ipFilterIdstring  Long-TermThe unique identifier of the IP filter.
namestringyes Long-TermThe name of the view permission token to create.
permissions[Permission]yes Long-TermA list of permissions related to the view that are granted. See Permission.
viewIds[string]yes Long-TermThe unique identifiers for the views associated with the permission token.