sourceTemplateManagementExternal

Create source template.

Changed on

Create source template.

post/v1/sourceTemplates

Request

  • Base URL
    https://api.au.sumologic.com/api
  • URL
    https://api.au.sumologic.com/api/v1/sourceTemplates
  • Auth
    HTTP basic

Query parameters

dryRunboolean
Example:true

Whether this creation request is a dry run. With dryRun set to true, the source template will not be created but the request will be validated.

Request body

isEnabledboolean

Indicates whether the source template is enabled - Create operation: Defaults to true (the template is enabled when created). - Update operation: If omitted, the existing status is preserved.

Example request

{
  "schemaRef": {
    "type": "Apache"
  },
  "inputJson": {
    "name": "apache_test_source_template",
    "receivers": {},
    "description": "Demo Description for Source Template",
    "processors": {}
  },
  "selector": {
    "tags": [
      [
        {
          "key": "key1",
          "values": [
            "value1"
          ]
        }
      ]
    ],
    "names": [
      "demo_macOS"
    ],
    "fleetIds": [
      "0000000006243FDD"
    ]
  },
  "isEnabled": true
}

Response

Create source template response

idstring

id of source template.

inputJsonobject

inputJson of source template

configstring

configuration of source template

totalCollectorLinkedinteger

count of total collector linked with this source template.

createdAtstring date-time

Creation timestamp in UTC in RFC3339 format.

modifiedAtstring date-time

Modification timestamp in UTC in RFC3339 format.

createdBystring

Id of the user who created source template

modifiedBystring

Id of the user who last modified the source template

status'enable' | 'disable'

Status of Source template

isEnabledboolean

A boolean parameter to get if the source template is enabled.

Example response

{
  "schemaRef": {
    "type": "Apache"
  },
  "id": "0000000003343FDD",
  "inputJson": {},
  "config": "apache.yaml.example",
  "selector": {
    "tags": [
      [
        {
          "key": "key1",
          "values": [
            "value1"
          ]
        }
      ]
    ],
    "names": [
      "demo_macOS"
    ],
    "fleetIds": [
      "0000000006243FDD"
    ]
  },
  "createdAt": "2018-10-16T09:10:00Z",
  "modifiedAt": "2018-10-16T09:10:00Z",
  "createdBy": "0000000006743FDD",
  "modifiedBy": "0000000006243FDD",
  "isEnabled": true
}

Changes

    • info

      added the new optional request property /

    • info

      added the optional property / to the response with the status

    • info

      added the new optional query request parameter dryRun