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

ParameterTypeRequired[a]DefaultDescription
repositoryNamestringyes The name of the repository.
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\".
customTokenstring  The custom token string. This requires special permissions and root privileges.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


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

ParameterTypeRequired[a]DefaultDescription
namestringyes Name of ingest token.
tokenstringyes The actual token.
parserParseryes The parser with which the token is associated (see Parser Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.