The addIngestTokenV2() GraphQL mutation is used to create a new Ingest API Token.

For more information on ingest tokens, see the Ingest Tokens documentation page.

Syntax

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

graphql
addIngestTokenV2(
      input: AddIngestTokenV3Input!
    ): IngestToken!

Given Datatypes

For the input (i.e., AddIngestTokenV3Input()), there are several parameters that may be given. Below is a list of them along with their datatype and a description of each:

Table: addIngestTokenV2

ParameterTypeRequiredDefaultDescription
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 17, 2024
customTokenstring  The custom token string. This requires special permissions and root privileges.
namestringyes The name of the ingest token to create.
parserstring  The unique identifier or name of the parser to assign to the ingest token. Parsers in packages can be referred to as \"packagescope/packagename:parsername\".
repositoryNamestringyes The name of the repository.

Returned Datatypes

As indicated by the syntax above, this mutation will return data using the datatype, IngestToken. Below is a list of the parameters of that datatype:

Table: IngestToken

ParameterTypeRequiredDefaultDescription
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.
namestringyes The name of ingest token.
parserParseryes The parser with which the token is associated. See Parser.
tokenstringyes The token.