API Stability Long-Term

The eventForwarders() GraphQL query will list all of the event forwarders associated with an organization. Currently, forwarding is done using Kafka.

This query is particularly useful when you want to make changes to an event forwarder using a mutation field: disableEventForwarder() and enableEventForwarder() to disable and enable an event forwarder; updateKafkaEventForwarder() to update a Kafka event forwarder; and deleteEventForwarder() to delete an event forwarder.

You can find this information in the UI by opening a particular repository or view, then choosing Settings. On that page, you'd look for Event Forwarders under Assets in the left margin. From there you'll see a list of event forwarders that will provide you details on each.

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

graphql
eventForwarders [EventForwarder]

Using this query field is fairly simple. There is nothing to enter for the input. You'd just enter the values you want returned, such as the name of the event forwarder and whether it's enabled.

Example

Below is an example using this query field:

Raw
graphql
query {
  eventForwarders 
  { id, name, enabled, description }  
}
Mac OS or Linux (curl)
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "query {
  eventForwarders 
  { id, name, enabled, description }  
}"
}
EOF
Mac OS or Linux (curl) One-line
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "query {
  eventForwarders 
  { id, name, enabled, description }  
}"
}
EOF
Windows Cmd and curl
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json" ^
    -d @'{"query" : "query { ^
  eventForwarders  ^
  { id, name, enabled, description }   ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "query {
  eventForwarders 
  { id, name, enabled, description }  
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "query {
  eventForwarders 
  { id, name, enabled, description }  
}";
$query =~ s/\n/ /g;
my $json = sprintf('{"query" : "%s"}',$query);
my $req = HTTP::Request->new("POST", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");

$req->content( $json );

my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "query {
  eventForwarders 
  { id, name, enabled, description }  
}"
}'''

resp = requests.post(url,
                     data = mydata,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

const data = JSON.stringify(
    {"query" : "query {
  eventForwarders 
  { id, name, enabled, description }  
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL',
  path: 'graphql',
  port: 443,
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Content-Length': data.length,
    Authorization: 'BEARER ' + process.env.TOKEN,
    'User-Agent': 'Node',
  },
};

const req = https.request(options, (res) => {
  let data = '';
  console.log(`statusCode: ${res.statusCode}`);

  res.on('data', (d) => {
    data += d;
  });
  res.on('end', () => {
    console.log(JSON.parse(data).data);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(data);
req.end();
Example Responses
Success (HTTP Response Code 200 OK)
json
{
  "data": {
    "eventForwarders": [
      {
        "id": "abc123",
        "name": "Majordomo",
        "enabled": true,
        "description": "Major event forwarder.\n"
      }
    ]
  }
}

Returned Datatype

For the return datatype, you might want to get the unique identifier for the eventforwarders found so that you can make changes (e.g., disable, enable, or delete) with the related mutation fields. Below is a list of parameters allowed with this datatype:

Table: EventForwarder

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For return datatypes, this indicates that you must specify which fields you want returned in the results.
Table last updated: Jul 3, 2025
descriptionstringyes Long-TermA description of the event forwarder.
enabledbooleanyes Long-TermWhether the event forwarder is enabled.
idstringyes Long-TermThe unique identifier of the event forwarder.
namestringyes Long-TermThe name of the event forwarder.