Update a Deployment Group
curl --request PUT \
--url https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": {
"conditions": {
"tags": [
"prod"
],
"version": ">= 1.0.0"
},
"notes": "Rolled out for the summer campaign hardware batch",
"state": "on"
}
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}"
payload = { "deployment": {
"conditions": {
"tags": ["prod"],
"version": ">= 1.0.0"
},
"notes": "Rolled out for the summer campaign hardware batch",
"state": "on"
} }
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({
deployment: {
conditions: {tags: ['prod'], version: '>= 1.0.0'},
notes: 'Rolled out for the summer campaign hardware batch',
state: 'on'
}
})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}', 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://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}",
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([
'deployment' => [
'conditions' => [
'tags' => [
'prod'
],
'version' => '>= 1.0.0'
],
'notes' => 'Rolled out for the summer campaign hardware batch',
'state' => 'on'
]
]),
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://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}"
payload := strings.NewReader("{\n \"deployment\": {\n \"conditions\": {\n \"tags\": [\n \"prod\"\n ],\n \"version\": \">= 1.0.0\"\n },\n \"notes\": \"Rolled out for the summer campaign hardware batch\",\n \"state\": \"on\"\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://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deployment\": {\n \"conditions\": {\n \"tags\": [\n \"prod\"\n ],\n \"version\": \">= 1.0.0\"\n },\n \"notes\": \"Rolled out for the summer campaign hardware batch\",\n \"state\": \"on\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}")
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 \"deployment\": {\n \"conditions\": {\n \"tags\": [\n \"prod\"\n ],\n \"version\": \">= 1.0.0\"\n },\n \"notes\": \"Rolled out for the summer campaign hardware batch\",\n \"state\": \"on\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"conditions": {
"tags": [
"beta"
],
"version": ">= 1.0.0"
},
"current_release": {
"firmware": {
"architecture": "arm",
"platform": "rpi0",
"uuid": "d9f8c63a-1234-5678-abcd-ef0123456789",
"version": "1.0.0"
},
"inserted_at": "2024-01-01T00:00:00Z",
"number": 3,
"updated_at": "2024-01-01T00:00:00Z"
},
"delta_updatable": false,
"device_count": 42,
"firmware_uuid": "d9f8c63a-1234-5678-abcd-ef0123456789",
"is_active": true,
"name": "production",
"notes": "Rolled out for the summer campaign hardware batch",
"releases_count": 3,
"state": "on"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"identifier": [
"can't be blank"
]
}
}Deployment Groups
Update a Deployment Group
PUT
/
api
/
orgs
/
{org_name}
/
products
/
{product_name}
/
deployments
/
{name}
Update a Deployment Group
curl --request PUT \
--url https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": {
"conditions": {
"tags": [
"prod"
],
"version": ">= 1.0.0"
},
"notes": "Rolled out for the summer campaign hardware batch",
"state": "on"
}
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}"
payload = { "deployment": {
"conditions": {
"tags": ["prod"],
"version": ">= 1.0.0"
},
"notes": "Rolled out for the summer campaign hardware batch",
"state": "on"
} }
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({
deployment: {
conditions: {tags: ['prod'], version: '>= 1.0.0'},
notes: 'Rolled out for the summer campaign hardware batch',
state: 'on'
}
})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}', 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://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}",
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([
'deployment' => [
'conditions' => [
'tags' => [
'prod'
],
'version' => '>= 1.0.0'
],
'notes' => 'Rolled out for the summer campaign hardware batch',
'state' => 'on'
]
]),
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://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}"
payload := strings.NewReader("{\n \"deployment\": {\n \"conditions\": {\n \"tags\": [\n \"prod\"\n ],\n \"version\": \">= 1.0.0\"\n },\n \"notes\": \"Rolled out for the summer campaign hardware batch\",\n \"state\": \"on\"\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://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deployment\": {\n \"conditions\": {\n \"tags\": [\n \"prod\"\n ],\n \"version\": \">= 1.0.0\"\n },\n \"notes\": \"Rolled out for the summer campaign hardware batch\",\n \"state\": \"on\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}/deployments/{name}")
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 \"deployment\": {\n \"conditions\": {\n \"tags\": [\n \"prod\"\n ],\n \"version\": \">= 1.0.0\"\n },\n \"notes\": \"Rolled out for the summer campaign hardware batch\",\n \"state\": \"on\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"conditions": {
"tags": [
"beta"
],
"version": ">= 1.0.0"
},
"current_release": {
"firmware": {
"architecture": "arm",
"platform": "rpi0",
"uuid": "d9f8c63a-1234-5678-abcd-ef0123456789",
"version": "1.0.0"
},
"inserted_at": "2024-01-01T00:00:00Z",
"number": 3,
"updated_at": "2024-01-01T00:00:00Z"
},
"delta_updatable": false,
"device_count": 42,
"firmware_uuid": "d9f8c63a-1234-5678-abcd-ef0123456789",
"is_active": true,
"name": "production",
"notes": "Rolled out for the summer campaign hardware batch",
"releases_count": 3,
"state": "on"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"identifier": [
"can't be blank"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization Name
Product Name
Deployment Group Name
Body
application/json
Deployment Group update request body
PUT body for updating a Deployment Group
Show child attributes
Show child attributes
Response
Deployment Group response
Response schema for a single Deployment Group
Show child attributes
Show child attributes
Example:
{
"conditions": { "tags": ["beta"], "version": ">= 1.0.0" },
"current_release": {
"firmware": {
"architecture": "arm",
"platform": "rpi0",
"uuid": "d9f8c63a-1234-5678-abcd-ef0123456789",
"version": "1.0.0"
},
"inserted_at": "2024-01-01T00:00:00Z",
"number": 3,
"updated_at": "2024-01-01T00:00:00Z"
},
"delta_updatable": false,
"device_count": 42,
"firmware_uuid": "d9f8c63a-1234-5678-abcd-ef0123456789",
"is_active": true,
"name": "production",
"notes": "Rolled out for the summer campaign hardware batch",
"releases_count": 3,
"state": "on"
}

