Update many templates
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{id: 'tpl_06d8k3m7q2v9x4b1n5c0e8f2ja', name: 'node-22-base'}]})
};
fetch('https://vms.dev/api/v1/templates/update-many', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://vms.dev/api/v1/templates/update-many \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "tpl_06d8k3m7q2v9x4b1n5c0e8f2ja",
"name": "node-22-base"
}
]
}
'import requests
url = "https://vms.dev/api/v1/templates/update-many"
payload = { "items": [
{
"id": "tpl_06d8k3m7q2v9x4b1n5c0e8f2ja",
"name": "node-22-base"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"succeeded": 0,
"failed": 0,
"message": "<string>",
"data": [
{
"index": 0,
"id": "<string>",
"error": "<string>"
}
]
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Templates
Update many templates
Renames up to 500 templates in one request. Each item has the id of a template and the fields of an update. The API returns a result for each item, in the sequence of the items. Needs the templates:write scope.
POST
/
v1
/
templates
/
update-many
Update many templates
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{id: 'tpl_06d8k3m7q2v9x4b1n5c0e8f2ja', name: 'node-22-base'}]})
};
fetch('https://vms.dev/api/v1/templates/update-many', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://vms.dev/api/v1/templates/update-many \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "tpl_06d8k3m7q2v9x4b1n5c0e8f2ja",
"name": "node-22-base"
}
]
}
'import requests
url = "https://vms.dev/api/v1/templates/update-many"
payload = { "items": [
{
"id": "tpl_06d8k3m7q2v9x4b1n5c0e8f2ja",
"name": "node-22-base"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"succeeded": 0,
"failed": 0,
"message": "<string>",
"data": [
{
"index": 0,
"id": "<string>",
"error": "<string>"
}
]
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Authorizations
Body
application/json