Skip to content

User Permission Requests

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/user-permission-requests/ List permission requests
GET /api/user-permission-requests/{uuid}/ Retrieve permission request
Other Actions
POST /api/user-permission-requests/{uuid}/approve/ Approve a permission request
POST /api/user-permission-requests/{uuid}/cancel_request/ Cancel a permission request
POST /api/user-permission-requests/{uuid}/reject/ Reject a permission request

Core CRUD

List permission requests

Retrieve a list of permission requests visible to the user.

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-permission-requests/ \
  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.user_permission_requests import user_permission_requests_list # (1)

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

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

try {
  const response = await userPermissionRequestsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
created_by string (uuid)
customer_uuid string (uuid)
invitation string (uuid)
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
state array

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)
invitation string (uri)
state string
created string (date-time)
created_by_full_name string
created_by_username string
created_by_email string (email)
reviewed_by_full_name string
reviewed_by_username string
reviewed_at string (date-time) Timestamp when the review was completed
review_comment string Optional comment provided during review
scope_uuid string (uuid)
scope_name string
customer_uuid string (uuid)
customer_name string
role_name string
role_description string
project_name_template string

Retrieve permission request

Retrieve details of a specific permission request.

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-permission-requests/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.user_permission_requests import user_permission_requests_retrieve # (1)

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

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

try {
  const response = await userPermissionRequestsRetrieve({
  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
url string (uri)
uuid string (uuid)
invitation string (uri)
state string
created string (date-time)
created_by_full_name string
created_by_username string
created_by_email string (email)
reviewed_by_full_name string
reviewed_by_username string
reviewed_at string (date-time) Timestamp when the review was completed
review_comment string Optional comment provided during review
scope_uuid string (uuid)
scope_name string
customer_uuid string (uuid)
customer_name string
role_name string
role_description string
project_name_template string

Other Actions

Approve a permission request

Approves a pending permission request, granting the requesting user the permissions defined in the associated group invitation.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-permission-requests/a1b2c3d4-e5f6-7890-abcd-ef1234567890/approve/ \
  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.review_comment_request import ReviewCommentRequest # (1)
from waldur_api_client.api.user_permission_requests import user_permission_requests_approve # (2)

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

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

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

try {
  const response = await userPermissionRequestsApprove({
  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
comment string

200 - No response body


Cancel a permission request

Cancels a pending or draft permission request. This can be done by the user who created the request or by a staff member.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-permission-requests/a1b2c3d4-e5f6-7890-abcd-ef1234567890/cancel_request/ \
  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.user_permission_requests import user_permission_requests_cancel_request # (1)

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

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

try {
  const response = await userPermissionRequestsCancelRequest({
  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 of the canceled permission request
scope_name string Name of the invitation scope
scope_uuid string UUID of the invitation scope

Reject a permission request

Rejects a pending permission request.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-permission-requests/a1b2c3d4-e5f6-7890-abcd-ef1234567890/reject/ \
  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.review_comment_request import ReviewCommentRequest # (1)
from waldur_api_client.api.user_permission_requests import user_permission_requests_reject # (2)

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

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

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

try {
  const response = await userPermissionRequestsReject({
  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
comment string

200 - No response body