/api/v1/tenants/{tenantId}/servers (POST)
POST
/api/v1/tenants/{tenantId}/servers
const url = 'https://example.com/api/v1/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/servers';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","templateId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","nodeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","image":"example","variables":"example","memoryMb":0,"cpuPercent":0,"diskMb":0,"steamAccountId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","updateOnStart":false,"portForwarding":true,"count":1,"extraPorts":[{"role":"example","protocol":"tcp"}],"startAfterInstall":false,"files":"install","archiveBackupId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/servers \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "templateId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "nodeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "image": "example", "variables": "example", "memoryMb": 0, "cpuPercent": 0, "diskMb": 0, "steamAccountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "updateOnStart": false, "portForwarding": true, "count": 1, "extraPorts": [ { "role": "example", "protocol": "tcp" } ], "startAfterInstall": false, "files": "install", "archiveBackupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenantId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
templateId
required
string format: uuid
nodeId
required
string format: uuid
image
required
null | string
variables
required
null | object
memoryMb
integer | string format: int32
cpuPercent
integer | string format: int32
diskMb
integer | string format: int32
steamAccountId
null | string format: uuid
updateOnStart
boolean
portForwarding
boolean
count
integer | string format: int32
extraPorts
Array<object> | null
object
role
required
string
protocol
required
startAfterInstall
boolean
files
archiveBackupId
null | string format: uuid
Responses
Section titled “Responses”OK