Skip to main content

access_groups

Creates, updates, deletes, gets or lists an access_groups resource.

Overview​

Nameaccess_groups
TypeResource
Idrailway.workspaces.access_groups

Fields​

The following fields are returned by SELECT queries:

One row per AccessGroup.

NameDatatypeDescription
idstring
namestring
workspace_idstring
created_atstring (date-time)
rolestring (ADMIN, MEMBER, VIEWER)
sourcestring (MANUAL)
updated_atstring (date-time)
workspaceobjectWorkspace object

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectworkspace_idLists AccessGroup objects of a Workspace. Backed by the Railway GraphQL query workspace.accessGroups.
createinsertname, role, workspace_idCreate an access group in a workspace. Backed by the Railway GraphQL mutation accessGroupCreate.
updateupdateidUpdate an access group's name or role. Backed by the Railway GraphQL mutation accessGroupUpdate.
deletedeleteidDelete an access group. Backed by the Railway GraphQL mutation accessGroupDelete.

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.

NameDatatypeDescription
workspace_idstring
idstring
namestring
rolestring(ADMIN, MEMBER, VIEWER)

SELECT examples​

Lists AccessGroup objects of a Workspace. Backed by the Railway GraphQL query workspace.accessGroups.

SELECT
id,
name,
workspace_id,
created_at,
role,
source,
updated_at,
workspace
FROM railway.workspaces.access_groups
WHERE workspace_id = '{{ workspace_id }}' -- required
;

INSERT examples​

Create an access group in a workspace. Backed by the Railway GraphQL mutation accessGroupCreate.

INSERT INTO railway.workspaces.access_groups (
name,
role,
workspace_id
)
SELECT
'{{ name }}' /* required */,
'{{ role }}' /* required */,
'{{ workspace_id }}' /* required */
RETURNING
id,
name,
workspace_id,
created_at,
role,
source,
updated_at,
workspace
;

UPDATE examples​

Update an access group's name or role. Backed by the Railway GraphQL mutation accessGroupUpdate.

UPDATE railway.workspaces.access_groups
SET
name = '{{ name }}',
role = '{{ role }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
name,
workspace_id,
created_at,
role,
source,
updated_at,
workspace;

DELETE examples​

Delete an access group. Backed by the Railway GraphQL mutation accessGroupDelete.

DELETE FROM railway.workspaces.access_groups
WHERE
id = '{{ id }}' --required
;