Skip to main content
Infrastructure/Collects

UploadTemplate

Upload a new custom template to the marketplace.

POST/api/v1/collects/templates

Operation ID

UploadTemplate

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • name
    StringRequired

    Human-readable name for the new template

    Example: My Custom Log Template

  • description
    StringRequired

    Detailed description of what this template collects

    Example: Collects application logs from /var/log/myapp/

  • category
    StringRequired

    Category for organizing the template in the marketplace

    Example: application

  • config
    ObjectRequired

    Configuration data as key-value pairs

    Example: (nested object)

  • variables
    LinkedHashMapRequired

    Template variables for parameter substitution

    Example: (nested object)

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • id
    String

    Unique identifier of the template

    Example: tmpl-nginx-001

  • name
    String

    Human-readable name of the template

    Example: Nginx Access Log Collector

  • description
    String

    Description of what this template collects and how it works

    Example: Collects Nginx access logs and parses common log format

  • category
    String

    Category grouping for the template (e.g. web, database, os)

    Example: web

  • author
    String

    Author or organization that created this template

    Example: zstack

  • downloads
    Integer

    Number of times this template has been downloaded

    Example: 120

  • rating
    Long

    Average user rating of this template on a scale of 1 to 5

    Example: 4.5

  • config
    Object

    Configuration data as key-value pairs

    Example: (nested object)

  • variables
    LinkedHashMap

    Template variables for parameter substitution

    Example: (nested object)

  • createDate
    String

    Create date

    Example: 2026-01-15T08:00:00Z