Skip to content

Keycloak User Group Memberships

Operations Summary

Method Endpoint Description
GET /api/keycloak-user-group-memberships/ List Keycloak User Group Memberships
GET /api/keycloak-user-group-memberships/{uuid}/ Retrieve
POST /api/keycloak-user-group-memberships/ Create
PUT /api/keycloak-user-group-memberships/{uuid}/ Update
PATCH /api/keycloak-user-group-memberships/{uuid}/ Partial Update
DELETE /api/keycloak-user-group-memberships/{uuid}/ Delete

List Keycloak User Group Memberships

1
2
3
4
http \
  GET \
  https://api.example.com/api/keycloak-user-group-memberships/ \
  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.keycloak_user_group_memberships import keycloak_user_group_memberships_list # (1)

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

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

try {
  const response = await keycloakUserGroupMembershipsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
email string
first_name string
group_uuid string (uuid)
last_name string
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
role_uuid string (uuid)
scope_type string
scope_uuid string (uuid)
state array
username string

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)
username string Keycloak user username
email string (email) User's email for notifications
first_name string
last_name string
group string (uri)
group_name string
group_role string
group_scope_type string
group_scope_name string Get the name of the cluster or project
state any
created string (date-time)
modified string (date-time)
last_checked string (date-time)
error_message string
error_traceback string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/keycloak-user-group-memberships/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.keycloak_user_group_memberships import keycloak_user_group_memberships_retrieve # (1)

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

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

try {
  const response = await keycloakUserGroupMembershipsRetrieve({
  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)
username string Keycloak user username
email string (email) User's email for notifications
first_name string
last_name string
group string (uri)
group_name string
group_role string
group_scope_type string
group_scope_name string Get the name of the cluster or project
state any
created string (date-time)
modified string (date-time)
last_checked string (date-time)
error_message string
error_traceback string

Create

1
2
3
4
5
6
7
8
http \
  POST \
  https://api.example.com/api/keycloak-user-group-memberships/ \
  Authorization:"Token YOUR_API_TOKEN" \
  username="alice" \
  email="alice@example.com" \
  scope_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  role="https://api.example.com/api/role/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 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.keycloak_user_group_membership_request import KeycloakUserGroupMembershipRequest # (1)
from waldur_api_client.api.keycloak_user_group_memberships import keycloak_user_group_memberships_create # (2)

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

body_data = KeycloakUserGroupMembershipRequest(
    username="alice",
    email="alice@example.com",
    scope_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    role="https://api.example.com/api/role/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = keycloak_user_group_memberships_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await keycloakUserGroupMembershipsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "username": "alice",
    "email": "alice@example.com",
    "scope_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "role": "https://api.example.com/api/role/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
username string Keycloak user username
email string (email) User's email for notifications
scope_uuid string (uuid) UUID of a cluster or a project in Rancher
Constraints: write-only
role string (uri)
Constraints: write-only

201 -

Field Type Description
uuid string (uuid)
url string (uri)
username string Keycloak user username
email string (email) User's email for notifications
first_name string
last_name string
group string (uri)
group_name string
group_role string
group_scope_type string
group_scope_name string Get the name of the cluster or project
state any
created string (date-time)
modified string (date-time)
last_checked string (date-time)
error_message string
error_traceback string

Update

1
2
3
4
5
6
7
8
http \
  PUT \
  https://api.example.com/api/keycloak-user-group-memberships/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  username="alice" \
  email="alice@example.com" \
  scope_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  role="https://api.example.com/api/role/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 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.keycloak_user_group_membership_request import KeycloakUserGroupMembershipRequest # (1)
from waldur_api_client.api.keycloak_user_group_memberships import keycloak_user_group_memberships_update # (2)

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

body_data = KeycloakUserGroupMembershipRequest(
    username="alice",
    email="alice@example.com",
    scope_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    role="https://api.example.com/api/role/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = keycloak_user_group_memberships_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await keycloakUserGroupMembershipsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "username": "alice",
    "email": "alice@example.com",
    "scope_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "role": "https://api.example.com/api/role/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
username string Keycloak user username
email string (email) User's email for notifications
scope_uuid string (uuid) UUID of a cluster or a project in Rancher
Constraints: write-only
role string (uri)
Constraints: write-only

200 -

Field Type Description
uuid string (uuid)
url string (uri)
username string Keycloak user username
email string (email) User's email for notifications
first_name string
last_name string
group string (uri)
group_name string
group_role string
group_scope_type string
group_scope_name string Get the name of the cluster or project
state any
created string (date-time)
modified string (date-time)
last_checked string (date-time)
error_message string
error_traceback string

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/keycloak-user-group-memberships/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_keycloak_user_group_membership_request import PatchedKeycloakUserGroupMembershipRequest # (1)
from waldur_api_client.api.keycloak_user_group_memberships import keycloak_user_group_memberships_partial_update # (2)

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

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

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

try {
  const response = await keycloakUserGroupMembershipsPartialUpdate({
  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
username string Keycloak user username
email string (email) User's email for notifications
scope_uuid string (uuid) UUID of a cluster or a project in Rancher
Constraints: write-only
role string (uri)
Constraints: write-only

200 -

Field Type Description
uuid string (uuid)
url string (uri)
username string Keycloak user username
email string (email) User's email for notifications
first_name string
last_name string
group string (uri)
group_name string
group_role string
group_scope_type string
group_scope_name string Get the name of the cluster or project
state any
created string (date-time)
modified string (date-time)
last_checked string (date-time)
error_message string
error_traceback string

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/keycloak-user-group-memberships/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.keycloak_user_group_memberships import keycloak_user_group_memberships_destroy # (1)

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

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

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