Update a Product's settings
curl --request PUT \
--url https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allow_unsigned_atomvm_firmware": true,
"allowed_update_tools": [
"fwup",
"atomvm"
]
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}"
payload = {
"allow_unsigned_atomvm_firmware": True,
"allowed_update_tools": ["fwup", "atomvm"]
}
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({allow_unsigned_atomvm_firmware: true, allowed_update_tools: ['fwup', 'atomvm']})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_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}",
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([
'allow_unsigned_atomvm_firmware' => true,
'allowed_update_tools' => [
'fwup',
'atomvm'
]
]),
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}"
payload := strings.NewReader("{\n \"allow_unsigned_atomvm_firmware\": true,\n \"allowed_update_tools\": [\n \"fwup\",\n \"atomvm\"\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allow_unsigned_atomvm_firmware\": true,\n \"allowed_update_tools\": [\n \"fwup\",\n \"atomvm\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_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 \"allow_unsigned_atomvm_firmware\": true,\n \"allowed_update_tools\": [\n \"fwup\",\n \"atomvm\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"allow_unsigned_atomvm_firmware": false,
"allow_unsigned_esp_idf_firmware": false,
"allowed_update_tools": [
"fwup"
],
"name": "Example Product",
"require_unique_firmware_version": true
}
}{
"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"
]
}
}Products
Update a Product's settings
PUT
/
api
/
orgs
/
{org_name}
/
products
/
{product_name}
Update a Product's settings
curl --request PUT \
--url https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allow_unsigned_atomvm_firmware": true,
"allowed_update_tools": [
"fwup",
"atomvm"
]
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_name}"
payload = {
"allow_unsigned_atomvm_firmware": True,
"allowed_update_tools": ["fwup", "atomvm"]
}
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({allow_unsigned_atomvm_firmware: true, allowed_update_tools: ['fwup', 'atomvm']})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_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}",
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([
'allow_unsigned_atomvm_firmware' => true,
'allowed_update_tools' => [
'fwup',
'atomvm'
]
]),
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}"
payload := strings.NewReader("{\n \"allow_unsigned_atomvm_firmware\": true,\n \"allowed_update_tools\": [\n \"fwup\",\n \"atomvm\"\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allow_unsigned_atomvm_firmware\": true,\n \"allowed_update_tools\": [\n \"fwup\",\n \"atomvm\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/products/{product_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 \"allow_unsigned_atomvm_firmware\": true,\n \"allowed_update_tools\": [\n \"fwup\",\n \"atomvm\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"allow_unsigned_atomvm_firmware": false,
"allow_unsigned_esp_idf_firmware": false,
"allowed_update_tools": [
"fwup"
],
"name": "Example Product",
"require_unique_firmware_version": true
}
}{
"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.
Body
application/json
Product update request body
PUT body for updating a product's settings.
Every field is optional; only the ones sent are changed. A product cannot be renamed here — its name is its identifier in every URL — and sending any field not listed below is an error rather than being ignored.
Response
Product response
Response schema for a single Product
Show child attributes
Show child attributes
Example:
{
"allow_unsigned_atomvm_firmware": false,
"allow_unsigned_esp_idf_firmware": false,
"allowed_update_tools": ["fwup"],
"name": "Example Product",
"require_unique_firmware_version": true
}

