custom_templates
Create a custom template
Create a custom template. Access policy: authenticated
post/custom_templates/create/file
Response
OK
Example response
{
"CreatedByUserId": 3,
"Description": "High performance web server",
"EntryPoint": "docker-compose.yml",
"GitConfig": {
"ConfigFilePath": "docker-compose.yml",
"ConfigHash": "bc4c183d756879ea4d173315338110b31004b8e0",
"ReferenceName": "refs/heads/branch_name",
"URL": "https://github.com/portainer/portainer.git"
},
"Id": 1,
"Logo": "https://portainer.io/img/logo.svg",
"Note": "This is my <b>custom</b> template",
"ProjectPath": "/data/custom_template/3",
"ResourceControl": {
"AdministratorsOnly": true,
"Id": 1,
"Public": true,
"ResourceId": "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08",
"SubResourceIds": [
"617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
]
},
"Title": "Nginx",
"Variables": [
{
"defaultValue": "default value",
"description": "Description",
"label": "My Variable",
"name": "MY_VAR"
}
],
"artifact": {
"files": [
{
"hash": "abc123",
"path": "portainer.yaml",
"ref": "refs/heads/main"
}
]
}
}