---
title: "Upgrade source template."
method: POST
path: "/v1/sourceTemplates/{id}/upgrade"
tags: ["sourceTemplateManagementExternal"]
---

# Upgrade source template.

`POST /v1/sourceTemplates/{id}/upgrade`

Upgrade a source template with the given identifier.

## Path parameters

- `id` string, required

## Request body

- SourceTemplateUpgradeRequest — request body for creating source template.
  - `schemaRef` UpgradeSchemaRef, required — schema reference for upgrade source template request.
    - `type` string, required — type of source template.
    - `version` string, required — version of source template.
  - `inputJson` object, required — inputJson of source template
    - `name` string, required — name of source template.
    - `receivers` object, required — receiver information of source template
    - `description` string — description of source template
    - `processors` object — processors for source template

## Response `200`

Upgrade source template response

- SourceTemplateDefinition — response definition of source template.
  - `schemaRef` SchemaRef — schema reference for source template.
    - `type` string, required — type of source template.
  - `id` string — id of source template.
  - `inputJson` object — inputJson of source template
  - `config` string — configuration of source template
  - `selector` Selector — Agent selector conditions
    - `tags` array[] — tags filter for agents
      - OtTag[]
        - `key` string, required — key of the given tag.
        - `values` string[], required — values of the given tag.
    - `names` string[] — names to select custom agents
  - `totalCollectorLinked` integer — count of total collector linked with this source template.
  - `createdAt` string, date-time — Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `modifiedAt` string, date-time — Modification timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `createdBy` string — Id of the user who created source template
  - `modifiedBy` string — Id of the user who last modified the source template
  - `status` 'enable' | 'disable' — Status of Source template
  - `isEnabled` boolean — A boolean parameter to get if the source template is enabled.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/versions/18a824df1e78/schema)
