API Stability Long-Term

The createEventForwardingRule() GraphQL mutation field is used to create an event forwarding rule on a repository and return it.

For more information on event forwarding rules, see the Event Forwarding Rules documentation page. You may also want to look at the Event Forwarding and the Events page for related information.

Syntax

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

graphql
createEventForwardingRule(
      input: CreateEventForwardingRule!
   ): EventForwardingRule!

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

Show:
graphql
mutation {
  createEventForwardingRule(input:
      { repoName: "humio",
        queryString: "@host=localhost",
        eventForwarderId: "RhLcbl3OJcjfIOmfPyLxVUpR9I2Fma6K",
        languageVersion: legacy
      } )
  { id }
}
Example Responses
Show:
json
{
  "data": {
    "createEventForwardingRule": {
      "id": "CiTUcuRYTtZIRfzqbhyBzn9O6HRehy9R"
    }
  }
}

Given Datatypes

For createEventForwardingRule, there are a few parameters. Below is a list of them along with descriptions of each:

Table: CreateEventForwardingRule

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: Mar 28, 2025
eventForwarderIdstringyes Long-TermThe id of the event forwarder.
languageVersionLanguageVersionEnumyeslegacyLong-TermThe version of Human language to use: legacy, xdr1, or xdrdetects1. If non-null, it will be a version known by the current LogScale installation. See LanguageVersionEnum.
queryStringstringyes Long-TermThe query string for filtering and mapping the events to forward.
repoNamestringyes Long-TermThe name of the repository of the event forwarding rule.

Returned Datatypes

The returned datatype EventForwardingRule has several parameters. Below is a list of them along with descriptions of each:

Table: EventForwardingRule

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: Mar 26, 2025
createdAtlong  Long-TermThe UNIX timestamp of when the event forwarder was created.
eventForwarderIdstringyes Long-TermThe unique identifier of the event forwarder.
idstringyes Long-TermThe unique identifier for the event forwarding rule.
languageVersionLanguageVersionyes Long-TermThe version of the LogScale query language to use. See LanguageVersion.
queryStringstringyes Long-TermThe query string for filtering and mapping the events to forward.