/servers/{id} (PATCH)
PATCH
/servers/{id}
const url = 'https://example.com/api/v1/servers/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","sshPort":1,"sshUser":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/servers/example \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "sshPort": 1, "sshUser": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
string
sshPort
integer
sshUser
string
Example generated
{ "name": "example", "sshPort": 1, "sshUser": "example"}Responses
Section titled “ Responses ”Default Response
Media type application/json
object
id
required
string
organizationId
required
string
name
required
string
host
required
string
sshPort
required
integer
dockerOk
required
boolean
caddyOk
required
boolean
createdAt
required
string format: date-time
Example
{ "role": "control", "status": "adding"}Default Response
Media type application/json
object
type
required
string
title
required
string
status
required
integer
code
required
string
detail
string
instance
string
errors
Array<object>
object
path
required
string
message
required
string
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "detail": "example", "instance": "example", "errors": [ { "path": "example", "message": "example" } ]}