Skip to content

Digitalocean Droplets

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/digitalocean-droplets/ List Digitalocean Droplets
GET /api/digitalocean-droplets/{uuid}/ Retrieve
POST /api/digitalocean-droplets/ Create
POST /api/digitalocean-droplets/{uuid}/pull/ Synchronize resource state
POST /api/digitalocean-droplets/{uuid}/unlink/ Unlink resource
PUT /api/digitalocean-droplets/{uuid}/ Update
PATCH /api/digitalocean-droplets/{uuid}/ Partial Update
DELETE /api/digitalocean-droplets/{uuid}/ Delete
Other Actions
POST /api/digitalocean-droplets/{uuid}/resize/ Resize
POST /api/digitalocean-droplets/{uuid}/restart/ Restart
POST /api/digitalocean-droplets/{uuid}/start/ Start
POST /api/digitalocean-droplets/{uuid}/stop/ Stop

Core CRUD

List Digitalocean Droplets

1
2
3
4
http \
  GET \
  https://api.example.com/api/digitalocean-droplets/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: digitalocean_droplets_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { digitaloceanDropletsList } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
backend_id string
can_manage boolean Can manage
customer string (uuid)
customer_abbreviation string
customer_name string
customer_native_name string
customer_uuid string (uuid)
description string
external_ip string
field array
name string
name_exact string
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project string (uuid)
project_name string
project_uuid string (uuid)
service_settings_name string
service_settings_uuid string (uuid)
state array
uuid string (uuid)

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
start_time string (date-time)
cores integer Number of cores in a VM
ram integer Memory size in MiB
disk integer Disk size in MiB
min_ram integer Minimum memory size in MiB
min_disk integer Minimum disk size in MiB
user_data string Additional data that will be added to instance on provisioning
external_ips array of string (ipv4)s
internal_ips array of string (ipv4)s
latitude number (double)
longitude number (double)
key_name string
key_fingerprint string
image_name string
runtime_state string
region_name string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsRetrieve } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
start_time string (date-time)
cores integer Number of cores in a VM
ram integer Memory size in MiB
disk integer Disk size in MiB
min_ram integer Minimum memory size in MiB
min_disk integer Minimum disk size in MiB
user_data string Additional data that will be added to instance on provisioning
external_ips array of string (ipv4)s
internal_ips array of string (ipv4)s
latitude number (double)
longitude number (double)
key_name string
key_fingerprint string
image_name string
runtime_state string
region_name string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Create

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-digitalocean-droplet" \
  service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  region="https://api.example.com/api/region/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  image="https://api.example.com/api/image/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  size=100
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.digital_ocean_droplet_request import DigitalOceanDropletRequest # (1)
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = DigitalOceanDropletRequest(
    name="my-awesome-digitalocean-droplet",
    service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    region="https://api.example.com/api/region/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    image="https://api.example.com/api/image/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    size=100
)
response = digitalocean_droplets_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: DigitalOceanDropletRequest
  2. API Source: digitalocean_droplets_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import { digitaloceanDropletsCreate } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-digitalocean-droplet",
    "service_settings": "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "project": "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "region": "https://api.example.com/api/region/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "image": "https://api.example.com/api/image/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "size": 100
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
name string
description string
service_settings string (uri)
project string (uri)
ssh_public_key string (uri)
Constraints: write-only
user_data string Additional data that will be added to instance on provisioning
region string (uri)
Constraints: write-only
image string (uri)
Constraints: write-only
size string (uri)
Constraints: write-only

201 -

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
start_time string (date-time)
cores integer Number of cores in a VM
ram integer Memory size in MiB
disk integer Disk size in MiB
min_ram integer Minimum memory size in MiB
min_disk integer Minimum disk size in MiB
user_data string Additional data that will be added to instance on provisioning
external_ips array of string (ipv4)s
internal_ips array of string (ipv4)s
latitude number (double)
longitude number (double)
key_name string
key_fingerprint string
image_name string
runtime_state string
region_name string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Synchronize resource state

Schedule an asynchronous pull operation to synchronize resource state from the backend. Returns 202 if the pull was scheduled successfully, or 409 if the pull operation is not implemented for this resource type.

1
2
3
4
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pull/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_pull # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_pull.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_pull
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsPull } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsPull({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

202 - No response body


409 - No response body


Delete resource from the database without scheduling operations on backend and without checking current state of the resource. It is intended to be used for removing resource stuck in transitioning state.

1
2
3
4
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unlink/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_unlink # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_unlink.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_unlink
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsUnlink } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsUnlink({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Update

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
http \
  PUT \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-digitalocean-droplet" \
  service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  region="https://api.example.com/api/region/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  image="https://api.example.com/api/image/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  size=100
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.digital_ocean_droplet_request import DigitalOceanDropletRequest # (1)
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = DigitalOceanDropletRequest(
    name="my-awesome-digitalocean-droplet",
    service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    region="https://api.example.com/api/region/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    image="https://api.example.com/api/image/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    size=100
)
response = digitalocean_droplets_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: DigitalOceanDropletRequest
  2. API Source: digitalocean_droplets_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
import { digitaloceanDropletsUpdate } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-digitalocean-droplet",
    "service_settings": "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "project": "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "region": "https://api.example.com/api/region/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "image": "https://api.example.com/api/image/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "size": 100
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
name string
description string
service_settings string (uri)
project string (uri)
ssh_public_key string (uri)
Constraints: write-only
user_data string Additional data that will be added to instance on provisioning
region string (uri)
Constraints: write-only
image string (uri)
Constraints: write-only
size string (uri)
Constraints: write-only

200 -

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
start_time string (date-time)
cores integer Number of cores in a VM
ram integer Memory size in MiB
disk integer Disk size in MiB
min_ram integer Minimum memory size in MiB
min_disk integer Minimum disk size in MiB
user_data string Additional data that will be added to instance on provisioning
external_ips array of string (ipv4)s
internal_ips array of string (ipv4)s
latitude number (double)
longitude number (double)
key_name string
key_fingerprint string
image_name string
runtime_state string
region_name string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_digital_ocean_droplet_request import PatchedDigitalOceanDropletRequest # (1)
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedDigitalOceanDropletRequest()
response = digitalocean_droplets_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedDigitalOceanDropletRequest
  2. API Source: digitalocean_droplets_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsPartialUpdate } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string

200 -

Field Type Description
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
start_time string (date-time)
cores integer Number of cores in a VM
ram integer Memory size in MiB
disk integer Disk size in MiB
min_ram integer Minimum memory size in MiB
min_disk integer Minimum disk size in MiB
user_data string Additional data that will be added to instance on provisioning
external_ips array of string (ipv4)s
internal_ips array of string (ipv4)s
latitude number (double)
longitude number (double)
key_name string
key_fingerprint string
image_name string
runtime_state string
region_name string
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsDestroy } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Resize

To resize droplet, submit a POST request to the instance URL, specifying URI of a target size.

Pass {'disk': true} along with target size in order to perform permanent resizing, which allows you to resize your disk space as well as CPU and RAM. After increasing the disk size, you will not be able to decrease it.

Pass {'disk': false} along with target size in order to perform flexible resizing, which only upgrades your CPU and RAM. This option is reversible.

Note that instance must be OFFLINE.

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resize/ \
  Authorization:"Token YOUR_API_TOKEN" \
  size=100 \
  disk=20480
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.digital_ocean_droplet_resize_request import DigitalOceanDropletResizeRequest # (1)
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_resize # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = DigitalOceanDropletResizeRequest(
    size=100,
    disk=20480
)
response = digitalocean_droplets_resize.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: DigitalOceanDropletResizeRequest
  2. API Source: digitalocean_droplets_resize
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import { digitaloceanDropletsResize } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsResize({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "size": 100,
    "disk": 20480
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
size string (uri)
disk boolean

200 -

Field Type
disk boolean

Restart

1
2
3
4
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/restart/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_restart # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_restart.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_restart
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsRestart } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsRestart({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Start

1
2
3
4
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/start/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_start # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_start.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_start
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsStart } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsStart({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Stop

1
2
3
4
http \
  POST \
  https://api.example.com/api/digitalocean-droplets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/stop/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.digitalocean_droplets import digitalocean_droplets_stop # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = digitalocean_droplets_stop.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: digitalocean_droplets_stop
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { digitaloceanDropletsStop } from 'waldur-js-client';

try {
  const response = await digitaloceanDropletsStop({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body