Update placement
curl --request PUT \
--url https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "<string>",
"description": "<string>",
"tags": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"spec": {
"count": 2,
"constraints": {
"maxSkew": 2,
"minDomains": 2
},
"serverSpec": {
"imageId": "<string>",
"networking": {
"allowedSourceAddresses": [
"<string>"
],
"publicIP": true,
"securityGroups": [
"<string>"
]
},
"sshCertificateAuthorityId": "<string>",
"userData": "aSDinaTvuI8gbWludGxpZnk="
}
}
}
'import requests
url = "https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}"
payload = {
"metadata": {
"name": "<string>",
"description": "<string>",
"tags": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"spec": {
"count": 2,
"constraints": {
"maxSkew": 2,
"minDomains": 2
},
"serverSpec": {
"imageId": "<string>",
"networking": {
"allowedSourceAddresses": ["<string>"],
"publicIP": True,
"securityGroups": ["<string>"]
},
"sshCertificateAuthorityId": "<string>",
"userData": "aSDinaTvuI8gbWludGxpZnk="
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
name: '<string>',
description: '<string>',
tags: [{name: '<string>', value: '<string>'}]
},
spec: {
count: 2,
constraints: {maxSkew: 2, minDomains: 2},
serverSpec: {
imageId: '<string>',
networking: {
allowedSourceAddresses: ['<string>'],
publicIP: true,
securityGroups: ['<string>']
},
sshCertificateAuthorityId: '<string>',
userData: 'aSDinaTvuI8gbWludGxpZnk='
}
}
})
};
fetch('https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'name' => '<string>',
'description' => '<string>',
'tags' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
],
'spec' => [
'count' => 2,
'constraints' => [
'maxSkew' => 2,
'minDomains' => 2
],
'serverSpec' => [
'imageId' => '<string>',
'networking' => [
'allowedSourceAddresses' => [
'<string>'
],
'publicIP' => true,
'securityGroups' => [
'<string>'
]
],
'sshCertificateAuthorityId' => '<string>',
'userData' => 'aSDinaTvuI8gbWludGxpZnk='
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}"
payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"spec\": {\n \"count\": 2,\n \"constraints\": {\n \"maxSkew\": 2,\n \"minDomains\": 2\n },\n \"serverSpec\": {\n \"imageId\": \"<string>\",\n \"networking\": {\n \"allowedSourceAddresses\": [\n \"<string>\"\n ],\n \"publicIP\": true,\n \"securityGroups\": [\n \"<string>\"\n ]\n },\n \"sshCertificateAuthorityId\": \"<string>\",\n \"userData\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"spec\": {\n \"count\": 2,\n \"constraints\": {\n \"maxSkew\": 2,\n \"minDomains\": 2\n },\n \"serverSpec\": {\n \"imageId\": \"<string>\",\n \"networking\": {\n \"allowedSourceAddresses\": [\n \"<string>\"\n ],\n \"publicIP\": true,\n \"securityGroups\": [\n \"<string>\"\n ]\n },\n \"sshCertificateAuthorityId\": \"<string>\",\n \"userData\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"spec\": {\n \"count\": 2,\n \"constraints\": {\n \"maxSkew\": 2,\n \"minDomains\": 2\n },\n \"serverSpec\": {\n \"imageId\": \"<string>\",\n \"networking\": {\n \"allowedSourceAddresses\": [\n \"<string>\"\n ],\n \"publicIP\": true,\n \"securityGroups\": [\n \"<string>\"\n ]\n },\n \"sshCertificateAuthorityId\": \"<string>\",\n \"userData\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"id": "b8ce034e-fccb-4d6c-a0e0-af3e3f346715",
"name": "training-workers",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2026-04-28T11:03:12.000Z",
"createdBy": "john.doe@example.com",
"provisioningStatus": "pending",
"healthStatus": "healthy",
"tags": [
{
"name": "workload",
"value": "training"
}
]
},
"spec": {
"count": 8,
"serverSpec": {
"imageId": "ubuntu-24.04",
"sshCertificateAuthorityId": "00de8f3c-77d6-424a-93c3-baf9153c7f21",
"networking": {
"securityGroups": [
"7ddfdbf0-bdbf-4630-9220-f1e6876f2dd0"
]
}
},
"constraints": {
"policy": "spread",
"maxSkew": 1,
"minDomains": 3,
"whenUnsatisfiable": "fail"
}
},
"status": {
"regionId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"reservationId": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"readyHostCount": 0
}
}{
"error": "invalid_request",
"error_description": "request body invalid",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "access_denied",
"error_description": "authentication failed",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "not_found",
"error_description": "the requested resource does not exist",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "conflict",
"error_description": "a resource with the same name already exists",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "server_error",
"error_description": "failed to token claim",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}Placements
Update placement
Update a placement. Only the server image (spec.serverSpec.imageId) and the update strategy (spec.updateStrategy) may change; all other fields are immutable after creation. Changing the image flags the placement’s servers as drifted; they converge per the update strategy, or one at a time with the per-server reconcile action.
PUT
/
api
/
v2
/
placements
/
{placementID}
Update placement
curl --request PUT \
--url https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "<string>",
"description": "<string>",
"tags": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"spec": {
"count": 2,
"constraints": {
"maxSkew": 2,
"minDomains": 2
},
"serverSpec": {
"imageId": "<string>",
"networking": {
"allowedSourceAddresses": [
"<string>"
],
"publicIP": true,
"securityGroups": [
"<string>"
]
},
"sshCertificateAuthorityId": "<string>",
"userData": "aSDinaTvuI8gbWludGxpZnk="
}
}
}
'import requests
url = "https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}"
payload = {
"metadata": {
"name": "<string>",
"description": "<string>",
"tags": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"spec": {
"count": 2,
"constraints": {
"maxSkew": 2,
"minDomains": 2
},
"serverSpec": {
"imageId": "<string>",
"networking": {
"allowedSourceAddresses": ["<string>"],
"publicIP": True,
"securityGroups": ["<string>"]
},
"sshCertificateAuthorityId": "<string>",
"userData": "aSDinaTvuI8gbWludGxpZnk="
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
name: '<string>',
description: '<string>',
tags: [{name: '<string>', value: '<string>'}]
},
spec: {
count: 2,
constraints: {maxSkew: 2, minDomains: 2},
serverSpec: {
imageId: '<string>',
networking: {
allowedSourceAddresses: ['<string>'],
publicIP: true,
securityGroups: ['<string>']
},
sshCertificateAuthorityId: '<string>',
userData: 'aSDinaTvuI8gbWludGxpZnk='
}
}
})
};
fetch('https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'name' => '<string>',
'description' => '<string>',
'tags' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
],
'spec' => [
'count' => 2,
'constraints' => [
'maxSkew' => 2,
'minDomains' => 2
],
'serverSpec' => [
'imageId' => '<string>',
'networking' => [
'allowedSourceAddresses' => [
'<string>'
],
'publicIP' => true,
'securityGroups' => [
'<string>'
]
],
'sshCertificateAuthorityId' => '<string>',
'userData' => 'aSDinaTvuI8gbWludGxpZnk='
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}"
payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"spec\": {\n \"count\": 2,\n \"constraints\": {\n \"maxSkew\": 2,\n \"minDomains\": 2\n },\n \"serverSpec\": {\n \"imageId\": \"<string>\",\n \"networking\": {\n \"allowedSourceAddresses\": [\n \"<string>\"\n ],\n \"publicIP\": true,\n \"securityGroups\": [\n \"<string>\"\n ]\n },\n \"sshCertificateAuthorityId\": \"<string>\",\n \"userData\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"spec\": {\n \"count\": 2,\n \"constraints\": {\n \"maxSkew\": 2,\n \"minDomains\": 2\n },\n \"serverSpec\": {\n \"imageId\": \"<string>\",\n \"networking\": {\n \"allowedSourceAddresses\": [\n \"<string>\"\n ],\n \"publicIP\": true,\n \"securityGroups\": [\n \"<string>\"\n ]\n },\n \"sshCertificateAuthorityId\": \"<string>\",\n \"userData\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://reservation.nks.europe-west4.nscale.com/api/v2/placements/{placementID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"spec\": {\n \"count\": 2,\n \"constraints\": {\n \"maxSkew\": 2,\n \"minDomains\": 2\n },\n \"serverSpec\": {\n \"imageId\": \"<string>\",\n \"networking\": {\n \"allowedSourceAddresses\": [\n \"<string>\"\n ],\n \"publicIP\": true,\n \"securityGroups\": [\n \"<string>\"\n ]\n },\n \"sshCertificateAuthorityId\": \"<string>\",\n \"userData\": \"aSDinaTvuI8gbWludGxpZnk=\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"id": "b8ce034e-fccb-4d6c-a0e0-af3e3f346715",
"name": "training-workers",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2026-04-28T11:03:12.000Z",
"createdBy": "john.doe@example.com",
"provisioningStatus": "pending",
"healthStatus": "healthy",
"tags": [
{
"name": "workload",
"value": "training"
}
]
},
"spec": {
"count": 8,
"serverSpec": {
"imageId": "ubuntu-24.04",
"sshCertificateAuthorityId": "00de8f3c-77d6-424a-93c3-baf9153c7f21",
"networking": {
"securityGroups": [
"7ddfdbf0-bdbf-4630-9220-f1e6876f2dd0"
]
}
},
"constraints": {
"policy": "spread",
"maxSkew": 1,
"minDomains": 3,
"whenUnsatisfiable": "fail"
}
},
"status": {
"regionId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"reservationId": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"readyHostCount": 0
}
}{
"error": "invalid_request",
"error_description": "request body invalid",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "access_denied",
"error_description": "authentication failed",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "not_found",
"error_description": "the requested resource does not exist",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "conflict",
"error_description": "a resource with the same name already exists",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}{
"error": "server_error",
"error_description": "failed to token claim",
"trace_id": "57bc14d9bd461f0b5a72db830149b67a"
}Authorizations
Body
application/json
A request to update a placement.
Was this page helpful?