Offering Keycloak Groups
Operations Summary
Core CRUD
List Offering Keycloak Groups
Retrieve
Pull members from Keycloak for a group
Delete
Other Actions
List members of a remote Keycloak group
List remote Keycloak groups for an offering
Search for users in remote Keycloak instance
| http \
GET \
https://api.example.com/api/offering-keycloak-groups/search_remote_users/ \
Authorization:"Token YOUR_API_TOKEN" \
offering_uuid=="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
q=="string-value"
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.offering_keycloak_groups import offering_keycloak_groups_search_remote_users_list # (1)
client = AuthenticatedClient(
base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = offering_keycloak_groups_search_remote_users_list.sync(
client=client,
offering_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
q="string-value"
)
for item in response:
print(item)
|
- API Source:
offering_keycloak_groups_search_remote_users_list
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | import { offeringKeycloakGroupsSearchRemoteUsersList } from 'waldur-js-client';
try {
const response = await offeringKeycloakGroupsSearchRemoteUsersList({
auth: "Token YOUR_API_TOKEN",
query: {
"offering_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"q": "string-value"
}
});
console.log('Success:', response);
} catch (error) {
console.error('Error:', error);
}
|
| Name |
Type |
Required |
Description |
offering_uuid |
string |
✓ |
UUID of the offering |
page |
integer |
|
A page number within the paginated result set. |
page_size |
integer |
|
Number of results to return per page. |
q |
string |
✓ |
Search query for username, email, or name |
resource_uuid |
string (uuid) |
|
|
role_uuid |
string (uuid) |
|
|
200 -
The response body is an array of objects, where each object has the following structure:
| Field |
Type |
id |
string |
username |
string |
email |
string |
first_name |
string |
last_name |
string |
Compare local and remote Keycloak group state
Import a remote Keycloak group as a local OfferingKeycloakGroup
| http \
POST \
https://api.example.com/api/offering-keycloak-groups/import_remote/ \
Authorization:"Token YOUR_API_TOKEN" \
offering_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
role_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
remote_group_id="string-value"
|
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.import_remote_group_request import ImportRemoteGroupRequest # (1)
from waldur_api_client.api.offering_keycloak_groups import offering_keycloak_groups_import_remote # (2)
client = AuthenticatedClient(
base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
body_data = ImportRemoteGroupRequest(
offering_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
role_uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
remote_group_id="string-value"
)
response = offering_keycloak_groups_import_remote.sync(
client=client,
body=body_data
)
print(response)
|
- Model Source:
ImportRemoteGroupRequest
- API Source:
offering_keycloak_groups_import_remote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | import { offeringKeycloakGroupsImportRemote } from 'waldur-js-client';
try {
const response = await offeringKeycloakGroupsImportRemote({
auth: "Token YOUR_API_TOKEN",
body: {
"offering_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"role_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"remote_group_id": "string-value"
}
});
console.log('Success:', response);
} catch (error) {
console.error('Error:', error);
}
|
| Field |
Type |
Required |
offering_uuid |
string (uuid) |
✓ |
role_uuid |
string (uuid) |
✓ |
remote_group_id |
string |
✓ |
resource_uuid |
string (uuid) |
|
scope_id |
string |
|
201 -
| Field |
Type |
Description |
uuid |
string (uuid) |
|
url |
string (uri) |
|
name |
string |
|
backend_id |
string |
|
offering |
string (uri) |
|
offering_uuid |
string (uuid) |
|
offering_name |
string |
|
role |
string (uri) |
|
role_name |
string |
|
role_scope_type |
string |
Level this role applies at, e.g. 'cluster', 'project'. Empty means offering-wide. |
resource |
string (uri) |
|
resource_uuid |
string (uuid) |
|
resource_name |
string |
|
scope_id |
string |
Sub-entity identifier within a resource, e.g. Rancher project ID within a cluster. |
created |
string (date-time) |
|
modified |
string (date-time) |
|
Set or unlink the backend_id (remote Keycloak group ID) for a local group
Test Keycloak connection for an offering