curl --request POST \
--url https://api.primeintellect.ai/api/admin/inventory/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"siteId": "<string>",
"nodes": [
{
"name": "<string>",
"publicIp": "<string>",
"publicIpv6": "<string>",
"privateIp": "<string>",
"privateInterface": "<string>",
"sshUser": "<string>",
"serial": "<string>",
"assetTag": "<string>",
"sshPort": 123,
"description": "<string>",
"comments": "<string>",
"storage": {},
"configContext": {},
"additional": {}
}
],
"clusterId": "<string>",
"status": "ACTIVE",
"role": "GPU_NODE",
"gpuCount": 123,
"nodeTypeId": "<string>",
"ansibleGroups": {},
"assignmentType": "STANDARD",
"isController": false,
"priceHr": 123,
"startDate": "2023-11-07T05:31:56Z",
"notes": "<string>",
"reassign": false
}
'import requests
url = "https://api.primeintellect.ai/api/admin/inventory/nodes"
payload = {
"siteId": "<string>",
"nodes": [
{
"name": "<string>",
"publicIp": "<string>",
"publicIpv6": "<string>",
"privateIp": "<string>",
"privateInterface": "<string>",
"sshUser": "<string>",
"serial": "<string>",
"assetTag": "<string>",
"sshPort": 123,
"description": "<string>",
"comments": "<string>",
"storage": {},
"configContext": {},
"additional": {}
}
],
"clusterId": "<string>",
"status": "ACTIVE",
"role": "GPU_NODE",
"gpuCount": 123,
"nodeTypeId": "<string>",
"ansibleGroups": {},
"assignmentType": "STANDARD",
"isController": False,
"priceHr": 123,
"startDate": "2023-11-07T05:31:56Z",
"notes": "<string>",
"reassign": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
siteId: '<string>',
nodes: [
{
name: '<string>',
publicIp: '<string>',
publicIpv6: '<string>',
privateIp: '<string>',
privateInterface: '<string>',
sshUser: '<string>',
serial: '<string>',
assetTag: '<string>',
sshPort: 123,
description: '<string>',
comments: '<string>',
storage: {},
configContext: {},
additional: {}
}
],
clusterId: '<string>',
status: 'ACTIVE',
role: 'GPU_NODE',
gpuCount: 123,
nodeTypeId: '<string>',
ansibleGroups: {},
assignmentType: 'STANDARD',
isController: false,
priceHr: 123,
startDate: '2023-11-07T05:31:56Z',
notes: '<string>',
reassign: false
})
};
fetch('https://api.primeintellect.ai/api/admin/inventory/nodes', 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://api.primeintellect.ai/api/admin/inventory/nodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'siteId' => '<string>',
'nodes' => [
[
'name' => '<string>',
'publicIp' => '<string>',
'publicIpv6' => '<string>',
'privateIp' => '<string>',
'privateInterface' => '<string>',
'sshUser' => '<string>',
'serial' => '<string>',
'assetTag' => '<string>',
'sshPort' => 123,
'description' => '<string>',
'comments' => '<string>',
'storage' => [
],
'configContext' => [
],
'additional' => [
]
]
],
'clusterId' => '<string>',
'status' => 'ACTIVE',
'role' => 'GPU_NODE',
'gpuCount' => 123,
'nodeTypeId' => '<string>',
'ansibleGroups' => [
],
'assignmentType' => 'STANDARD',
'isController' => false,
'priceHr' => 123,
'startDate' => '2023-11-07T05:31:56Z',
'notes' => '<string>',
'reassign' => false
]),
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://api.primeintellect.ai/api/admin/inventory/nodes"
payload := strings.NewReader("{\n \"siteId\": \"<string>\",\n \"nodes\": [\n {\n \"name\": \"<string>\",\n \"publicIp\": \"<string>\",\n \"publicIpv6\": \"<string>\",\n \"privateIp\": \"<string>\",\n \"privateInterface\": \"<string>\",\n \"sshUser\": \"<string>\",\n \"serial\": \"<string>\",\n \"assetTag\": \"<string>\",\n \"sshPort\": 123,\n \"description\": \"<string>\",\n \"comments\": \"<string>\",\n \"storage\": {},\n \"configContext\": {},\n \"additional\": {}\n }\n ],\n \"clusterId\": \"<string>\",\n \"status\": \"ACTIVE\",\n \"role\": \"GPU_NODE\",\n \"gpuCount\": 123,\n \"nodeTypeId\": \"<string>\",\n \"ansibleGroups\": {},\n \"assignmentType\": \"STANDARD\",\n \"isController\": false,\n \"priceHr\": 123,\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"reassign\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.primeintellect.ai/api/admin/inventory/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": \"<string>\",\n \"nodes\": [\n {\n \"name\": \"<string>\",\n \"publicIp\": \"<string>\",\n \"publicIpv6\": \"<string>\",\n \"privateIp\": \"<string>\",\n \"privateInterface\": \"<string>\",\n \"sshUser\": \"<string>\",\n \"serial\": \"<string>\",\n \"assetTag\": \"<string>\",\n \"sshPort\": 123,\n \"description\": \"<string>\",\n \"comments\": \"<string>\",\n \"storage\": {},\n \"configContext\": {},\n \"additional\": {}\n }\n ],\n \"clusterId\": \"<string>\",\n \"status\": \"ACTIVE\",\n \"role\": \"GPU_NODE\",\n \"gpuCount\": 123,\n \"nodeTypeId\": \"<string>\",\n \"ansibleGroups\": {},\n \"assignmentType\": \"STANDARD\",\n \"isController\": false,\n \"priceHr\": 123,\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"reassign\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/admin/inventory/nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": \"<string>\",\n \"nodes\": [\n {\n \"name\": \"<string>\",\n \"publicIp\": \"<string>\",\n \"publicIpv6\": \"<string>\",\n \"privateIp\": \"<string>\",\n \"privateInterface\": \"<string>\",\n \"sshUser\": \"<string>\",\n \"serial\": \"<string>\",\n \"assetTag\": \"<string>\",\n \"sshPort\": 123,\n \"description\": \"<string>\",\n \"comments\": \"<string>\",\n \"storage\": {},\n \"configContext\": {},\n \"additional\": {}\n }\n ],\n \"clusterId\": \"<string>\",\n \"status\": \"ACTIVE\",\n \"role\": \"GPU_NODE\",\n \"gpuCount\": 123,\n \"nodeTypeId\": \"<string>\",\n \"ansibleGroups\": {},\n \"assignmentType\": \"STANDARD\",\n \"isController\": false,\n \"priceHr\": 123,\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"reassign\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operationId": "<string>",
"message": "<string>",
"targetId": "<string>",
"targetName": "<string>",
"created": 123,
"updated": 123,
"assigned": 123
},
"status": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Import Inventory Nodes
Create or update inventory nodes in bulk. Optionally assign them to a cluster.
This is an upsert. The service matches a node by (name, siteId). For an existing node, it overwrites the host vars. With ansible_groups, it replaces the cluster additional.ansibleGroups. Because the operation is an upsert, both inventory:create and inventory:update are required and scoped to clusterId. The audit records the acting admin. The prime-admin import command also needs inventory:read for resolution and collision preflight.
curl --request POST \
--url https://api.primeintellect.ai/api/admin/inventory/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"siteId": "<string>",
"nodes": [
{
"name": "<string>",
"publicIp": "<string>",
"publicIpv6": "<string>",
"privateIp": "<string>",
"privateInterface": "<string>",
"sshUser": "<string>",
"serial": "<string>",
"assetTag": "<string>",
"sshPort": 123,
"description": "<string>",
"comments": "<string>",
"storage": {},
"configContext": {},
"additional": {}
}
],
"clusterId": "<string>",
"status": "ACTIVE",
"role": "GPU_NODE",
"gpuCount": 123,
"nodeTypeId": "<string>",
"ansibleGroups": {},
"assignmentType": "STANDARD",
"isController": false,
"priceHr": 123,
"startDate": "2023-11-07T05:31:56Z",
"notes": "<string>",
"reassign": false
}
'import requests
url = "https://api.primeintellect.ai/api/admin/inventory/nodes"
payload = {
"siteId": "<string>",
"nodes": [
{
"name": "<string>",
"publicIp": "<string>",
"publicIpv6": "<string>",
"privateIp": "<string>",
"privateInterface": "<string>",
"sshUser": "<string>",
"serial": "<string>",
"assetTag": "<string>",
"sshPort": 123,
"description": "<string>",
"comments": "<string>",
"storage": {},
"configContext": {},
"additional": {}
}
],
"clusterId": "<string>",
"status": "ACTIVE",
"role": "GPU_NODE",
"gpuCount": 123,
"nodeTypeId": "<string>",
"ansibleGroups": {},
"assignmentType": "STANDARD",
"isController": False,
"priceHr": 123,
"startDate": "2023-11-07T05:31:56Z",
"notes": "<string>",
"reassign": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
siteId: '<string>',
nodes: [
{
name: '<string>',
publicIp: '<string>',
publicIpv6: '<string>',
privateIp: '<string>',
privateInterface: '<string>',
sshUser: '<string>',
serial: '<string>',
assetTag: '<string>',
sshPort: 123,
description: '<string>',
comments: '<string>',
storage: {},
configContext: {},
additional: {}
}
],
clusterId: '<string>',
status: 'ACTIVE',
role: 'GPU_NODE',
gpuCount: 123,
nodeTypeId: '<string>',
ansibleGroups: {},
assignmentType: 'STANDARD',
isController: false,
priceHr: 123,
startDate: '2023-11-07T05:31:56Z',
notes: '<string>',
reassign: false
})
};
fetch('https://api.primeintellect.ai/api/admin/inventory/nodes', 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://api.primeintellect.ai/api/admin/inventory/nodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'siteId' => '<string>',
'nodes' => [
[
'name' => '<string>',
'publicIp' => '<string>',
'publicIpv6' => '<string>',
'privateIp' => '<string>',
'privateInterface' => '<string>',
'sshUser' => '<string>',
'serial' => '<string>',
'assetTag' => '<string>',
'sshPort' => 123,
'description' => '<string>',
'comments' => '<string>',
'storage' => [
],
'configContext' => [
],
'additional' => [
]
]
],
'clusterId' => '<string>',
'status' => 'ACTIVE',
'role' => 'GPU_NODE',
'gpuCount' => 123,
'nodeTypeId' => '<string>',
'ansibleGroups' => [
],
'assignmentType' => 'STANDARD',
'isController' => false,
'priceHr' => 123,
'startDate' => '2023-11-07T05:31:56Z',
'notes' => '<string>',
'reassign' => false
]),
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://api.primeintellect.ai/api/admin/inventory/nodes"
payload := strings.NewReader("{\n \"siteId\": \"<string>\",\n \"nodes\": [\n {\n \"name\": \"<string>\",\n \"publicIp\": \"<string>\",\n \"publicIpv6\": \"<string>\",\n \"privateIp\": \"<string>\",\n \"privateInterface\": \"<string>\",\n \"sshUser\": \"<string>\",\n \"serial\": \"<string>\",\n \"assetTag\": \"<string>\",\n \"sshPort\": 123,\n \"description\": \"<string>\",\n \"comments\": \"<string>\",\n \"storage\": {},\n \"configContext\": {},\n \"additional\": {}\n }\n ],\n \"clusterId\": \"<string>\",\n \"status\": \"ACTIVE\",\n \"role\": \"GPU_NODE\",\n \"gpuCount\": 123,\n \"nodeTypeId\": \"<string>\",\n \"ansibleGroups\": {},\n \"assignmentType\": \"STANDARD\",\n \"isController\": false,\n \"priceHr\": 123,\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"reassign\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.primeintellect.ai/api/admin/inventory/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": \"<string>\",\n \"nodes\": [\n {\n \"name\": \"<string>\",\n \"publicIp\": \"<string>\",\n \"publicIpv6\": \"<string>\",\n \"privateIp\": \"<string>\",\n \"privateInterface\": \"<string>\",\n \"sshUser\": \"<string>\",\n \"serial\": \"<string>\",\n \"assetTag\": \"<string>\",\n \"sshPort\": 123,\n \"description\": \"<string>\",\n \"comments\": \"<string>\",\n \"storage\": {},\n \"configContext\": {},\n \"additional\": {}\n }\n ],\n \"clusterId\": \"<string>\",\n \"status\": \"ACTIVE\",\n \"role\": \"GPU_NODE\",\n \"gpuCount\": 123,\n \"nodeTypeId\": \"<string>\",\n \"ansibleGroups\": {},\n \"assignmentType\": \"STANDARD\",\n \"isController\": false,\n \"priceHr\": 123,\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"reassign\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/admin/inventory/nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": \"<string>\",\n \"nodes\": [\n {\n \"name\": \"<string>\",\n \"publicIp\": \"<string>\",\n \"publicIpv6\": \"<string>\",\n \"privateIp\": \"<string>\",\n \"privateInterface\": \"<string>\",\n \"sshUser\": \"<string>\",\n \"serial\": \"<string>\",\n \"assetTag\": \"<string>\",\n \"sshPort\": 123,\n \"description\": \"<string>\",\n \"comments\": \"<string>\",\n \"storage\": {},\n \"configContext\": {},\n \"additional\": {}\n }\n ],\n \"clusterId\": \"<string>\",\n \"status\": \"ACTIVE\",\n \"role\": \"GPU_NODE\",\n \"gpuCount\": 123,\n \"nodeTypeId\": \"<string>\",\n \"ansibleGroups\": {},\n \"assignmentType\": \"STANDARD\",\n \"isController\": false,\n \"priceHr\": 123,\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"reassign\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operationId": "<string>",
"message": "<string>",
"targetId": "<string>",
"targetName": "<string>",
"created": 123,
"updated": 123,
"assigned": 123
},
"status": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Bulk create/upsert nodes (e.g. from a parsed inventory.ini). Batch fields apply
to every node; nodes upsert by (name, site_id). site_id is required. When
cluster_id is given the nodes are also assigned to that cluster (with the shared
assignment attrs below); otherwise they are just created.
1000Show child attributes
Show child attributes
ACTIVE, PLANNED, DECOMMISSIONING, INVENTORY, OFFLINE, FAILED GPU_NODE, CPU_NODE STANDARD, FAILOVER Was this page helpful?