The Collector Management API allows you to create, update, and delete Collectors and Sources from an HTTP endpoint. This topic describes the Source API methods, which you can use to create installed or hosted Sources of any type by specifying the sourceType parameter.

Examples

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Examples

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Note that the filter value shown above is an example for excluding a keyword. Filter values are specified to do batch edits to Processing Rules for Sources. For details on the different types of filters available, see Creating Processing Rules Using a JSON File.

PUT methods

Update Source

Updates an existing source. All modifiable fields must be provided, and all not modifiable fields must match those existing in the system.

Updating a Source also requires the "If-Match" header to be specified with the "ETag" provided in the headers of a previous GET request.

Method: PUT Path: /collectors/[collectorId]/sources/[sourceId]

Parameter

Type

Required?

Default

Description

collectorId

integer

Yes

NA

Unique Collector identifier.

sourceId

integer

Yes

NA

Unique Source identifier.

Example

This example updates the Host Metrics Source created in the previous example with "interval" = 15000.

First, use a GET request with -v flag to obtain the "ETag" header value.

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Note that the filter value shown above is an example for excluding a keyword. Filter values are specified to do batch edits to Processing Rules for Sources. For details on the different types of filters available, see Creating Processing Rules Using a JSON File.

Example

Sumo Logic endpoints like api.sumologic.com are different in deployments outside us1. For example, an API endpoint in Europe would begin api.eu.sumologic.com. A service endpoint in us2 (Western US) would begin service.us2.sumologic.com. For more information, see Sumo Logic Endpoints.

Response: There will be no response body, only a 200 OK response code.

Error Codes and Messages for Source API

Code

Message

BadRequestBladeId

Request body contains an invalid Source ID.

CannotModifySources

Collector is in JSON mode, user cannot create, delete, or update sources using the API.

Recommended articles

Sumo Logic is the industry’s leading secure, cloud-native, machine data analytics service, delivering real-time, continuous intelligence across the entire application lifecycle and stack. More than 1,000 customers around the globe rely on Sumo Logic for the analytics and insights to build, run and secure their modern applications and cloud infrastructures.