Save an existing configuration as a reusable template

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Saves the specified configuration as a template for future reuse across deployments.

Request URL

https://{server-hostname}:8383/dcapi/configuration/{collectionId}/saveAsTemplate

Scope

Configurations.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

AcceptstringMandatory
application/collnTemplateDetails.v1+jsonapplication/collnTemplateDetails.v1+jsonCopied!

- Path Parameters

collectionIdstringMandatory

The unique numeric identifier of the configuration to be saved as a reusable template. Fetch from Get Configurations View .

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/dcapi/configuration/{collectionId}/saveAsTemplate \
  --header 'Accept: application/collnTemplateDetails.v1+json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52'
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON object
Hide Sub-Attributes
templateIdlong

The unique ID of the newly created template

statusstring

Human-readable confirmation message

- HTTP code 400

Response Body - application/json
JSON object
Hide Sub-Attributes
error_codestring

SERVICE_NOT_AVAILABLE: the configuration was created from a Global Template and save-as-template is restricted for MSP

error_descriptionstring

Message indicating Global Template restriction prevents save-as-template

- HTTP code 401

Response Body - application/json
JSON object
Hide Sub-Attributes
errorCodelong

Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication=required)

errorMsgstring

Authentication failure reason

- HTTP code 413

Response Body - application/json
JSON object
Hide Sub-Attributes
error_codestring

INTERNAL_SERVER_ERROR: storage limit exceeded on the server to create the template

error_descriptionstring

Message indicating insufficient storage space to create the template

Possible Response Codes

200HTTP code
400HTTP code
401HTTP code
413HTTP code

Sample Response: HTTP 200

Template created successfully from existing configuration

Copied!
  {
    "templateId": 2001,
    "status": "Template created successfully."
  }
                
Show full

Sample Response: HTTP 400

Configuration was created from a Global Template

Copied!
  {
    "error_description": "Configuration created from a Global Template cannot be saved as template",
    "error_code": "SERVICE_NOT_AVAILABLE"
  }
                
Show full

Sample Response: HTTP 401

User lacks write role

Copied!
  {
    "error_description": "Access denied - You are not allowed to access the requested resource.",
    "error_code": "UAC_UNAUTHORIZED"
  }
                
Show full

Sample Response: HTTP 413

Server storage limit exceeded

Copied!
  {
    "error_description": "Insufficient storage space to create the template",
    "error_code": "INTERNAL_SERVER_ERROR"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.