Skip to content

Rancher Workloads

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/rancher-workloads/ List Rancher Workloads
GET /api/rancher-workloads/{uuid}/ Retrieve
POST /api/rancher-workloads/ Create
PUT /api/rancher-workloads/{uuid}/ Update
PATCH /api/rancher-workloads/{uuid}/ Partial Update
DELETE /api/rancher-workloads/{uuid}/ Delete
Other Actions
GET /api/rancher-workloads/{uuid}/yaml/ Yaml
POST /api/rancher-workloads/{uuid}/redeploy/ Redeploy
PUT /api/rancher-workloads/{uuid}/yaml/ Yaml

Core CRUD

List Rancher Workloads

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-workloads/ \
  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.rancher_workloads import rancher_workloads_list # (1)

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

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

try {
  const response = await rancherWorkloadsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
cluster_uuid string (uuid)
name string
name_exact string
namespace_uuid string (uuid)
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project_uuid string (uuid)
settings string
settings_uuid string (uuid)

200 -

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

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-workloads/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.rancher_workloads import rancher_workloads_retrieve # (1)

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

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

try {
  const response = await rancherWorkloadsRetrieve({
  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 -

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer

Create

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/rancher-workloads/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-rancher-workload" \
  scale=123
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.rancher_workload_request import RancherWorkloadRequest # (1)
from waldur_api_client.api.rancher_workloads import rancher_workloads_create # (2)

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

body_data = RancherWorkloadRequest(
    name="my-awesome-rancher-workload",
    scale=123
)
response = rancher_workloads_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await rancherWorkloadsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-rancher-workload",
    "scale": 123
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
runtime_state string
cluster string (uri)
project string (uri)
namespace string (uri)
scale integer

201 -

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer

Update

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/rancher-workloads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-rancher-workload" \
  scale=123
 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.rancher_workload_request import RancherWorkloadRequest # (1)
from waldur_api_client.api.rancher_workloads import rancher_workloads_update # (2)

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

body_data = RancherWorkloadRequest(
    name="my-awesome-rancher-workload",
    scale=123
)
response = rancher_workloads_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await rancherWorkloadsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-rancher-workload",
    "scale": 123
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
runtime_state string
cluster string (uri)
project string (uri)
namespace string (uri)
scale integer

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/rancher-workloads/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_rancher_workload_request import PatchedRancherWorkloadRequest # (1)
from waldur_api_client.api.rancher_workloads import rancher_workloads_partial_update # (2)

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

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

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

try {
  const response = await rancherWorkloadsPartialUpdate({
  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
runtime_state string
cluster string (uri)
project string (uri)
namespace string (uri)
scale integer

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/rancher-workloads/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.rancher_workloads import rancher_workloads_destroy # (1)

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

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

try {
  const response = await rancherWorkloadsDestroy({
  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

Yaml

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-workloads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/yaml/ \
  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.rancher_workloads import rancher_workloads_yaml_retrieve # (1)

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

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

try {
  const response = await rancherWorkloadsYamlRetrieve({
  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 -

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer

Redeploy

1
2
3
4
http \
  POST \
  https://api.example.com/api/rancher-workloads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/redeploy/ \
  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.rancher_workloads import rancher_workloads_redeploy # (1)

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

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

try {
  const response = await rancherWorkloadsRedeploy({
  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


Yaml

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/rancher-workloads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/yaml/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-rancher-workload" \
  scale=123
 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.rancher_workload_request import RancherWorkloadRequest # (1)
from waldur_api_client.api.rancher_workloads import rancher_workloads_yaml_update # (2)

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

body_data = RancherWorkloadRequest(
    name="my-awesome-rancher-workload",
    scale=123
)
response = rancher_workloads_yaml_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await rancherWorkloadsYamlUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-rancher-workload",
    "scale": 123
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
runtime_state string
cluster string (uri)
project string (uri)
namespace string (uri)
scale integer

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
scale integer