Skip to main content
POST
/
servers
/
{server_id}
/
actions
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.servers.actions(server_id="sv_LYV8DZAQq5QoE", data={
        "type": latitudesh_python_sdk.CreateServerActionServersType.ACTIONS,
        "attributes": {
            "action": latitudesh_python_sdk.CreateServerActionAction.REBOOT,
        },
    })

    # Handle response
    print(res)
{
  "data": {
    "id": "act_V0DgYxxN9Ed4A",
    "type": "actions",
    "attributes": {
      "status": "Rebooting device"
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

server_id
string
required

Body

data
object
required

Response

201 - application/vnd.api+json

Created

data
object
meta
object
I