Skip to content

Organization Groups

Operations Summary

Method Endpoint Description
GET /api/organization-groups/ List Organization Groups
GET /api/organization-groups/{uuid}/ Retrieve
POST /api/organization-groups/ Create
PUT /api/organization-groups/{uuid}/ Update
PATCH /api/organization-groups/{uuid}/ Partial Update
DELETE /api/organization-groups/{uuid}/ Delete

List Organization Groups

1
2
3
4
http \
  GET \
  https://api.example.com/api/organization-groups/ \
  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.organization_groups import organization_groups_list # (1)

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

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

try {
  const response = await organizationGroupsList({
  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 string Which field to use when ordering the results.
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
parent string (uuid) Parent UUID

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)
name string
parent_uuid string (uuid) UUID of the parent organization group
parent_name string Name of the parent organization group
parent string (uri)
customers_count integer Number of customers in this organization group

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/organization-groups/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.organization_groups import organization_groups_retrieve # (1)

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

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

try {
  const response = await organizationGroupsRetrieve({
  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)
name string
parent_uuid string (uuid) UUID of the parent organization group
parent_name string Name of the parent organization group
parent string (uri)
customers_count integer Number of customers in this organization group

Create

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/organization-groups/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-organization-group"
 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.organization_group_request import OrganizationGroupRequest # (1)
from waldur_api_client.api.organization_groups import organization_groups_create # (2)

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

body_data = OrganizationGroupRequest(
    name="my-awesome-organization-group"
)
response = organization_groups_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await organizationGroupsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-organization-group"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
parent string (uri)

201 -

Field Type Description
uuid string (uuid)
url string (uri)
name string
parent_uuid string (uuid) UUID of the parent organization group
parent_name string Name of the parent organization group
parent string (uri)
customers_count integer Number of customers in this organization group

Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/organization-groups/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-organization-group"
 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.organization_group_request import OrganizationGroupRequest # (1)
from waldur_api_client.api.organization_groups import organization_groups_update # (2)

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

body_data = OrganizationGroupRequest(
    name="my-awesome-organization-group"
)
response = organization_groups_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await organizationGroupsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-organization-group"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
parent string (uri)

200 -

Field Type Description
uuid string (uuid)
url string (uri)
name string
parent_uuid string (uuid) UUID of the parent organization group
parent_name string Name of the parent organization group
parent string (uri)
customers_count integer Number of customers in this organization group

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/organization-groups/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_organization_group_request import PatchedOrganizationGroupRequest # (1)
from waldur_api_client.api.organization_groups import organization_groups_partial_update # (2)

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

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

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

try {
  const response = await organizationGroupsPartialUpdate({
  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
parent string (uri)

200 -

Field Type Description
uuid string (uuid)
url string (uri)
name string
parent_uuid string (uuid) UUID of the parent organization group
parent_name string Name of the parent organization group
parent string (uri)
customers_count integer Number of customers in this organization group

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/organization-groups/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.organization_groups import organization_groups_destroy # (1)

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

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

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