Skip to content

Science Domains

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/science-domains/ List Science Domains
GET /api/science-domains/{uuid}/ Retrieve
POST /api/science-domains/ Create
PUT /api/science-domains/{uuid}/ Update
PATCH /api/science-domains/{uuid}/ Partial Update
DELETE /api/science-domains/{uuid}/ Delete
Other Actions
GET /api/science-domains/presets/ List available science domain presets
POST /api/science-domains/load_preset/ Load a science domain preset

Core CRUD

List Science Domains

1
2
3
4
http \
  GET \
  https://api.example.com/api/science-domains/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.science_domain_o_enum import ScienceDomainOEnum # (1)
from waldur_api_client.api.science_domains import science_domains_list # (2)

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

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

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

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
uuid string (uuid)
url string (uri)
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string
created string (date-time)
modified string (date-time)
subdomains_count integer Number of sub-domains in this domain

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/science-domains/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.science_domains import science_domains_retrieve # (1)

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

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

try {
  const response = await scienceDomainsRetrieve({
  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 Description
uuid string (uuid)
url string (uri)
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string
created string (date-time)
modified string (date-time)
subdomains_count integer Number of sub-domains in this domain

Create

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/science-domains/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-science-domain"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.science_domain_request import ScienceDomainRequest # (1)
from waldur_api_client.api.science_domains import science_domains_create # (2)

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

body_data = ScienceDomainRequest(
    name="my-awesome-science-domain"
)
response = science_domains_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await scienceDomainsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-science-domain"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string

201 -

Field Type Description
uuid string (uuid)
url string (uri)
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string
created string (date-time)
modified string (date-time)
subdomains_count integer Number of sub-domains in this domain

Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/science-domains/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-science-domain"
 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.science_domain_request import ScienceDomainRequest # (1)
from waldur_api_client.api.science_domains import science_domains_update # (2)

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

body_data = ScienceDomainRequest(
    name="my-awesome-science-domain"
)
response = science_domains_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await scienceDomainsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-science-domain"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string

200 -

Field Type Description
uuid string (uuid)
url string (uri)
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string
created string (date-time)
modified string (date-time)
subdomains_count integer Number of sub-domains in this domain

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/science-domains/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_science_domain_request import PatchedScienceDomainRequest # (1)
from waldur_api_client.api.science_domains import science_domains_partial_update # (2)

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

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

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

try {
  const response = await scienceDomainsPartialUpdate({
  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 Description
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string

200 -

Field Type Description
uuid string (uuid)
url string (uri)
code string Domain code (e.g. '1'). Auto-derived if left blank.
name string
created string (date-time)
modified string (date-time)
subdomains_count integer Number of sub-domains in this domain

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/science-domains/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.science_domains import science_domains_destroy # (1)

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

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

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

List available science domain presets

1
2
3
4
http \
  GET \
  https://api.example.com/api/science-domains/presets/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.science_domain_o_enum import ScienceDomainOEnum # (1)
from waldur_api_client.api.science_domains import science_domains_presets_list # (2)

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

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

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

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
name string
label string
description string

Load a science domain preset

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/science-domains/load_preset/ \
  Authorization:"Token YOUR_API_TOKEN" \
  preset="cscs"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.load_science_domain_preset_request import LoadScienceDomainPresetRequest # (1)
from waldur_api_client.api.science_domains import science_domains_load_preset # (2)

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

body_data = LoadScienceDomainPresetRequest(
    preset="cscs"
)
response = science_domains_load_preset.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await scienceDomainsLoadPreset({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "preset": "cscs"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
preset string

200 -

Field Type
created_domains integer
created_subdomains integer
skipped_domains integer
skipped_subdomains integer