group_role_assignments
Creates, updates, deletes, gets or lists a group_role_assignments resource.
Overview
| Name | group_role_assignments |
| Type | Resource |
| Id | openai_admin.projects.group_role_assignments |
Fields
The following fields are returned by SELECT queries:
- list
Project group role assignments listed successfully.
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier for the role. |
name | string | Name of the role. |
created_at | integer (unixtime) | When the role was created. |
created_by | string | Identifier of the actor who created the role. |
created_by_user_obj | object | User details for the actor that created the role, when available. |
description | string | Description of the role. |
metadata | object | Arbitrary metadata stored on the role. |
permissions | array | Permissions associated with the role. |
predefined_role | boolean | Whether the role is predefined by OpenAI. |
resource_type | string | Resource type the role applies to. |
updated_at | integer (int64) | When the role was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | project_id, group_id | limit, after, order | |
assign | insert | project_id, group_id, role_id | ||
unassign | delete | project_id, group_id, role_id |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
group_id | string | The ID of the group whose project role assignment should be removed. |
project_id | string | The ID of the project to modify. |
role_id | string | The ID of the project role to remove from the group. |
after | string | Cursor for pagination. Provide the value from the previous response's next field to continue listing project roles. |
limit | integer | A limit on the number of project role assignments to return. |
order | string | Sort order for the returned project roles. |
SELECT examples
- list
Project group role assignments listed successfully.
SELECT
id,
name,
created_at,
created_by,
created_by_user_obj,
description,
metadata,
permissions,
predefined_role,
resource_type,
updated_at
FROM openai_admin.projects.group_role_assignments
WHERE project_id = '{{ project_id }}' -- required
AND group_id = '{{ group_id }}' -- required
AND limit = '{{ limit }}'
AND after = '{{ after }}'
AND order = '{{ order }}'
;
INSERT examples
- assign
- Manifest
No description available.
INSERT INTO openai_admin.projects.group_role_assignments (
role_id,
project_id,
group_id
)
SELECT
'{{ role_id }}' /* required */,
'{{ project_id }}',
'{{ group_id }}'
RETURNING
group,
object,
role
;
# Description fields are for documentation purposes
- name: group_role_assignments
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the group_role_assignments resource.
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the group_role_assignments resource.
- name: role_id
value: "{{ role_id }}"
description: |
Identifier of the role to assign.
DELETE examples
- unassign
No description available.
DELETE FROM openai_admin.projects.group_role_assignments
WHERE project_id = '{{ project_id }}' --required
AND group_id = '{{ group_id }}' --required
AND role_id = '{{ role_id }}' --required
;