Batch server action
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>'], params: {}})
};
fetch('https://api.example.com/v1/regions/{region}/infrastructure/servers/actions', 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.example.com/v1/regions/{region}/infrastructure/servers/actions"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v1/regions/{region}/infrastructure/servers/actions \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
],
"params": {}
}
'import requests
url = "https://api.example.com/v1/regions/{region}/infrastructure/servers/actions"
payload = {
"ids": ["<string>"],
"params": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"action": "<string>",
"serverCount": 123,
"results": [
{
"serverId": "<string>",
"status": "accepted",
"reason": "<string>"
}
]
}
}Servers
Batch server action
Perform an action on multiple servers. Provide server IDs in the request body.
POST
/
v1
/
regions
/
{region}
/
infrastructure
/
servers
/
actions
Batch server action
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>'], params: {}})
};
fetch('https://api.example.com/v1/regions/{region}/infrastructure/servers/actions', 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.example.com/v1/regions/{region}/infrastructure/servers/actions"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v1/regions/{region}/infrastructure/servers/actions \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
],
"params": {}
}
'import requests
url = "https://api.example.com/v1/regions/{region}/infrastructure/servers/actions"
payload = {
"ids": ["<string>"],
"params": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"action": "<string>",
"serverCount": 123,
"results": [
{
"serverId": "<string>",
"status": "accepted",
"reason": "<string>"
}
]
}
}Path Parameters
Region identifier
Body
application/json
Was this page helpful?