Skip to content

Slurm Jobs

Operations Summary

Method Endpoint Description
GET /api/slurm-jobs/ List Slurm Jobs
GET /api/slurm-jobs/{uuid}/ Retrieve
POST /api/slurm-jobs/ Create
POST /api/slurm-jobs/{uuid}/pull/ Synchronize resource state
POST /api/slurm-jobs/{uuid}/unlink/ Unlink resource
PUT /api/slurm-jobs/{uuid}/ Update
PATCH /api/slurm-jobs/{uuid}/ Partial Update
DELETE /api/slurm-jobs/{uuid}/ Delete

List Slurm Jobs

1
2
3
4
http \
  GET \
  https://api.example.com/api/slurm-jobs/ \
  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.slurm_jobs import slurm_jobs_list # (1)

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

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

try {
  const response = await slurmJobsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
field array
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

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
runtime_state string
file string (uri)
user string (uri) Reference to user which submitted job
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
report any

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/slurm-jobs/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.slurm_jobs import slurm_jobs_retrieve # (1)

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

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

try {
  const response = await slurmJobsRetrieve({
  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
runtime_state string
file string (uri)
user string (uri) Reference to user which submitted job
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
report any

Create

1
2
3
4
5
6
7
8
http \
  POST \
  https://api.example.com/api/slurm-jobs/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-slurm-job" \
  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/" \
  file="string-value"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.firecrest_job_request import FirecrestJobRequest # (1)
from waldur_api_client.api.slurm_jobs import slurm_jobs_create # (2)

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

body_data = FirecrestJobRequest(
    name="my-awesome-slurm-job",
    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/",
    file="string-value"
)
response = slurm_jobs_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await slurmJobsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-slurm-job",
    "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/",
    "file": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
description string
service_settings string (uri)
project string (uri)
runtime_state string
file string (binary)

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
runtime_state string
file string (uri)
user string (uri) Reference to user which submitted job
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
report any

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/slurm-jobs/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.slurm_jobs import slurm_jobs_pull # (1)

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

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

try {
  const response = await slurmJobsPull({
  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/slurm-jobs/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.slurm_jobs import slurm_jobs_unlink # (1)

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

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

try {
  const response = await slurmJobsUnlink({
  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
http \
  PUT \
  https://api.example.com/api/slurm-jobs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-slurm-job" \
  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/" \
  file="string-value"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.firecrest_job_request import FirecrestJobRequest # (1)
from waldur_api_client.api.slurm_jobs import slurm_jobs_update # (2)

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

body_data = FirecrestJobRequest(
    name="my-awesome-slurm-job",
    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/",
    file="string-value"
)
response = slurm_jobs_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await slurmJobsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-slurm-job",
    "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/",
    "file": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string
service_settings string (uri)
project string (uri)
runtime_state string
file string (binary)

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
runtime_state string
file string (uri)
user string (uri) Reference to user which submitted job
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
report any

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/slurm-jobs/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_firecrest_job_request import PatchedFirecrestJobRequest # (1)
from waldur_api_client.api.slurm_jobs import slurm_jobs_partial_update # (2)

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

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

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

try {
  const response = await slurmJobsPartialUpdate({
  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
runtime_state 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
runtime_state string
file string (uri)
user string (uri) Reference to user which submitted job
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
report any

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/slurm-jobs/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.slurm_jobs import slurm_jobs_destroy # (1)

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

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

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