The createParser() GraphQL mutation may be used to create a parser in LogScale. However, this has been deprecated and will be removed in version 1.142. It has been replaced by mutation where more extensive test cases can be set. Use createParserV2() instead.

For more information on creating a parser, see the Creating a Parser documentation page. You may also want to look at the Parsing Data and Parsing Log Data pages for related information.

Syntax

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

graphql
createParser(
      input: CreateParserInput!
   ): CreateParserMutation!

Given Datatypes

For the given datatype, CreateParserInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: CreateParserInput

ParameterTypeRequired[a]DefaultDescription
namestringyes Name of the action.
testData[string]yes Name of the action.
sourceCodestringyes Name of the action.
repositoryNamestringyes Name of the view of the action.
tagFields[string]yes Slack webhook URL to where request is to be sent.
forceboolean! = falseyes Fields to include within the Slack message. Can be templated with values from the result (see SlackFieldEntryInput Table).
languageVersionLanguageVersionEnum = legacyyes Defines whether the action should use the configured proxy to make web requests.

[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

The returned datatype CreateParserMutation has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: CreateParserMutation

ParameterTypeRequired[a]DefaultDescription
actionParseryes The parser to create (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.