Update Existing Server
curl --request PUT \
--url https://api.example.com/cabinet/admin/servers/{server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"description": "<string>",
"country_code": "<string>",
"is_available": true,
"is_trial_eligible": true,
"price_kopeks": 1,
"max_users": 1,
"sort_order": 1,
"promo_group_ids": [
123
]
}
'import requests
url = "https://api.example.com/cabinet/admin/servers/{server_id}"
payload = {
"display_name": "<string>",
"description": "<string>",
"country_code": "<string>",
"is_available": True,
"is_trial_eligible": True,
"price_kopeks": 1,
"max_users": 1,
"sort_order": 1,
"promo_group_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
country_code: '<string>',
is_available: true,
is_trial_eligible: true,
price_kopeks: 1,
max_users: 1,
sort_order: 1,
promo_group_ids: [123]
})
};
fetch('https://api.example.com/cabinet/admin/servers/{server_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/cabinet/admin/servers/{server_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'description' => '<string>',
'country_code' => '<string>',
'is_available' => true,
'is_trial_eligible' => true,
'price_kopeks' => 1,
'max_users' => 1,
'sort_order' => 1,
'promo_group_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/cabinet/admin/servers/{server_id}"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"country_code\": \"<string>\",\n \"is_available\": true,\n \"is_trial_eligible\": true,\n \"price_kopeks\": 1,\n \"max_users\": 1,\n \"sort_order\": 1,\n \"promo_group_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://api.example.com/cabinet/admin/servers/{server_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"country_code\": \"<string>\",\n \"is_available\": true,\n \"is_trial_eligible\": true,\n \"price_kopeks\": 1,\n \"max_users\": 1,\n \"sort_order\": 1,\n \"promo_group_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cabinet/admin/servers/{server_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"country_code\": \"<string>\",\n \"is_available\": true,\n \"is_trial_eligible\": true,\n \"price_kopeks\": 1,\n \"max_users\": 1,\n \"sort_order\": 1,\n \"promo_group_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"squad_uuid": "<string>",
"display_name": "<string>",
"is_available": true,
"is_trial_eligible": true,
"price_kopeks": 123,
"price_rubles": 123,
"current_users": 123,
"sort_order": 123,
"is_full": true,
"availability_status": "<string>",
"promo_groups": [
{
"id": 123,
"name": "<string>",
"is_selected": false
}
],
"active_subscriptions": 123,
"tariffs_using": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"original_name": "<string>",
"country_code": "<string>",
"description": "<string>",
"max_users": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Cabinet Admin Servers
Update Existing Server
Update an existing server.
PUT
/
cabinet
/
admin
/
servers
/
{server_id}
Update Existing Server
curl --request PUT \
--url https://api.example.com/cabinet/admin/servers/{server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"description": "<string>",
"country_code": "<string>",
"is_available": true,
"is_trial_eligible": true,
"price_kopeks": 1,
"max_users": 1,
"sort_order": 1,
"promo_group_ids": [
123
]
}
'import requests
url = "https://api.example.com/cabinet/admin/servers/{server_id}"
payload = {
"display_name": "<string>",
"description": "<string>",
"country_code": "<string>",
"is_available": True,
"is_trial_eligible": True,
"price_kopeks": 1,
"max_users": 1,
"sort_order": 1,
"promo_group_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
country_code: '<string>',
is_available: true,
is_trial_eligible: true,
price_kopeks: 1,
max_users: 1,
sort_order: 1,
promo_group_ids: [123]
})
};
fetch('https://api.example.com/cabinet/admin/servers/{server_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/cabinet/admin/servers/{server_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'description' => '<string>',
'country_code' => '<string>',
'is_available' => true,
'is_trial_eligible' => true,
'price_kopeks' => 1,
'max_users' => 1,
'sort_order' => 1,
'promo_group_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/cabinet/admin/servers/{server_id}"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"country_code\": \"<string>\",\n \"is_available\": true,\n \"is_trial_eligible\": true,\n \"price_kopeks\": 1,\n \"max_users\": 1,\n \"sort_order\": 1,\n \"promo_group_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://api.example.com/cabinet/admin/servers/{server_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"country_code\": \"<string>\",\n \"is_available\": true,\n \"is_trial_eligible\": true,\n \"price_kopeks\": 1,\n \"max_users\": 1,\n \"sort_order\": 1,\n \"promo_group_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cabinet/admin/servers/{server_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"country_code\": \"<string>\",\n \"is_available\": true,\n \"is_trial_eligible\": true,\n \"price_kopeks\": 1,\n \"max_users\": 1,\n \"sort_order\": 1,\n \"promo_group_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"squad_uuid": "<string>",
"display_name": "<string>",
"is_available": true,
"is_trial_eligible": true,
"price_kopeks": 123,
"price_rubles": 123,
"current_users": 123,
"sort_order": 123,
"is_full": true,
"availability_status": "<string>",
"promo_groups": [
{
"id": 123,
"name": "<string>",
"is_selected": false
}
],
"active_subscriptions": 123,
"tariffs_using": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"original_name": "<string>",
"country_code": "<string>",
"description": "<string>",
"max_users": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Request to update a server.
Required string length:
1 - 255Maximum string length:
5Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Response
Successful Response
Detailed server response.
Show child attributes
Show child attributes
⌘I
