Provision server
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({osImage: '<string>', configuration: {}})
};
fetch('https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers/{id}:provision', 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/{id}:provision"
payload := strings.NewReader("{\n \"osImage\": \"<string>\",\n \"configuration\": {}\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/{id}:provision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"osImage": "<string>",
"configuration": {}
}
'import requests
url = "https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers/{id}:provision"
payload = {
"osImage": "<string>",
"configuration": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"jobId": "<string>",
"status": "queued"
}{
"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
Provision server
Initiate host provisioning workflow to move host from Registered to Ready state.
POST
/
v1
/
regions
/
{region}
/
projects
/
{project}
/
infrastructure
/
servers
/
{id}
:provision
Provision server
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({osImage: '<string>', configuration: {}})
};
fetch('https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers/{id}:provision', 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/{id}:provision"
payload := strings.NewReader("{\n \"osImage\": \"<string>\",\n \"configuration\": {}\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/{id}:provision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"osImage": "<string>",
"configuration": {}
}
'import requests
url = "https://api.k0rdent.ai/v1/regions/{region}/projects/{project}/infrastructure/servers/{id}:provision"
payload = {
"osImage": "<string>",
"configuration": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"jobId": "<string>",
"status": "queued"
}{
"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
Path Parameters
Region identifier
Project identifier
Unique server identifier (UUID)
Body
application/json
Was this page helpful?