Skip to main content
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));
{
  "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": [
            {}
          ]
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication using OAuth2/OIDC tokens

Path Parameters

region
string
required

Region identifier

project
string
required

Project identifier

Body

application/json
servers
object[]

Array of server registration requests

Response

Bulk enrollment results

succeeded
object[]

Successfully registered servers

failed
object[]

Failed registration attempts