Get server
const options = {method: 'GET'};
fetch('https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}import requests
url = "https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}"
response = requests.get(url)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"hostname": "<string>",
"status": "available",
"health": "healthy",
"regionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"serialNumber": "<string>",
"bmcAddress": "<string>",
"profileId": "<string>",
"specs": {
"cpu": "<string>",
"memoryGB": 123,
"storageGB": 123,
"nics": 123
},
"tags": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Servers
Get server
Get server details, health status, tags, and profile assignment
GET
/
v1
/
regions
/
{region}
/
infrastructure
/
servers
/
{id}
Get server
const options = {method: 'GET'};
fetch('https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}import requests
url = "https://api.example.com/v1/regions/{region}/infrastructure/servers/{id}"
response = requests.get(url)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"hostname": "<string>",
"status": "available",
"health": "healthy",
"regionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"serialNumber": "<string>",
"bmcAddress": "<string>",
"profileId": "<string>",
"specs": {
"cpu": "<string>",
"memoryGB": 123,
"storageGB": 123,
"nics": 123
},
"tags": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Was this page helpful?