Skip to main content
POST
/
v1
/
templates
Create template
curl --request POST \
  --url https://api.cnap.tech/v1/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "PostgreSQL HA",
  "sources": [
    {
      "chart": {
        "repo_url": "<string>",
        "target_revision": "<string>",
        "chart": "<string>",
        "path": "<string>"
      },
      "values": {},
      "metadata": {
        "artifact_hub_helm_package": {},
        "auto_deploy": true
      }
    }
  ],
  "registry_proxy_mode": "auto"
}
'
{
  "template_id": "<string>"
}

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Body

application/json
name
string
required
Required string length: 1 - 100
Example:

"PostgreSQL HA"

sources
object[]
required
Minimum array length: 1
registry_proxy_mode
enum<string>
Available options:
auto,
always,
never

Response

Template created

template_id
string
required