Bulk enroll servers
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
servers: [
{
bmcAddress: '<string>',
tags: {},
displayName: '<string>',
description: '<string>',
persona: '<string>'
}
]
})
};
fetch('https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate"
payload := strings.NewReader("{\n \"servers\": [\n {\n \"bmcAddress\": \"<string>\",\n \"tags\": {},\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"persona\": \"<string>\"\n }\n ]\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))
}curl --request POST \
--url https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"servers": [
{
"bmcAddress": "<string>",
"tags": {},
"displayName": "<string>",
"description": "<string>",
"persona": "<string>"
}
]
}
'import requests
url = "https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate"
payload = { "servers": [
{
"bmcAddress": "<string>",
"tags": {},
"displayName": "<string>",
"description": "<string>",
"persona": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"succeeded": [
{
"selfLink": "/v1/regions/us-texas-1/projects/project-x9y8z7/infrastructure/servers/server-p7q8r9",
"uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "server-p7q8r9",
"displayName": "<string>",
"description": "<string>",
"hardwareSpecs": {
"cpu": {},
"ram": {},
"gpu": {}
},
"bmcAddress": "<string>",
"provisioningState": "registered",
"healthStatus": {
"status": "healthy",
"lastCheckTime": "2023-11-07T05:31:56Z",
"failureReasons": [
"<string>"
]
},
"tags": {},
"persona": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"failed": [
{
"index": 123,
"error": {
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}
}
]
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}servers
Bulk enroll servers
Bulk enroll multiple servers via CSV or JSON file upload.
POST
/
v1
/
regions
/
{region}
/
projects
/
{project}
/
infrastructure
/
servers:batchCreate
Bulk enroll servers
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
servers: [
{
bmcAddress: '<string>',
tags: {},
displayName: '<string>',
description: '<string>',
persona: '<string>'
}
]
})
};
fetch('https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate"
payload := strings.NewReader("{\n \"servers\": [\n {\n \"bmcAddress\": \"<string>\",\n \"tags\": {},\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"persona\": \"<string>\"\n }\n ]\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))
}curl --request POST \
--url https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"servers": [
{
"bmcAddress": "<string>",
"tags": {},
"displayName": "<string>",
"description": "<string>",
"persona": "<string>"
}
]
}
'import requests
url = "https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers:batchCreate"
payload = { "servers": [
{
"bmcAddress": "<string>",
"tags": {},
"displayName": "<string>",
"description": "<string>",
"persona": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"succeeded": [
{
"selfLink": "/v1/regions/us-texas-1/projects/project-x9y8z7/infrastructure/servers/server-p7q8r9",
"uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "server-p7q8r9",
"displayName": "<string>",
"description": "<string>",
"hardwareSpecs": {
"cpu": {},
"ram": {},
"gpu": {}
},
"bmcAddress": "<string>",
"provisioningState": "registered",
"healthStatus": {
"status": "healthy",
"lastCheckTime": "2023-11-07T05:31:56Z",
"failureReasons": [
"<string>"
]
},
"tags": {},
"persona": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"failed": [
{
"index": 123,
"error": {
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}
}
]
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"details": [
{}
]
}
}Authorizations
Bearer token authentication using OAuth2/OIDC tokens
Body
application/json
Array of server registration requests
Show child attributes
Show child attributes
Was this page helpful?