Skip to main content

groups

Creates, updates, deletes, gets or lists a groups resource.

Overview

Namegroups
TypeResource
Idcloudflare.iam.groups

Fields

The following fields are returned by SELECT queries:

Get SCIM Group response

NameDatatypeDescription
contentsstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, group_idRetrieves a single SCIM Group resource by group ID.
listselectaccount_idstartIndex, count, filterLists SCIM Group resources for the account. Returns both system groups (backed by Cloudflare permission groups, prefixed cloudflare-v1-) and custom user groups. Supports filtering by displayName using SCIM filter syntax.
scim_groups_createinsertaccount_id, displayNameCreates a new SCIM Group (user group) for the account. The displayName must not be empty and must not begin with CF (reserved for system groups).
scim_groups_patchupdateaccount_id, group_id, schemas, OperationsPartially updates a SCIM Group via PATCH operations (RFC 7644 Section 3.5.2). Supports add, remove, and replace operations on members, displayName, and externalId. For system groups (prefixed cloudflare-v1-), only member management operations are supported.
scim_groups_deletedeleteaccount_id, group_idDeletes a SCIM Group (custom user groups only). System groups backed by Cloudflare permission groups cannot be deleted via SCIM. Returns 204 No Content on success.

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
account_idstringThe Cloudflare account ID.
group_idstringThe Access group ID.
countinteger
filterstring
startIndexinteger

SELECT examples

Retrieves a single SCIM Group resource by group ID.

SELECT
contents
FROM cloudflare.iam.groups
WHERE account_id = '{{ account_id }}' -- required
AND group_id = '{{ group_id }}' -- required
;

INSERT examples

Creates a new SCIM Group (user group) for the account. The displayName must not be empty and must not begin with CF (reserved for system groups).

INSERT INTO cloudflare.iam.groups (
displayName,
externalId,
account_id
)
SELECT
'{{ displayName }}' /* required */,
'{{ externalId }}',
'{{ account_id }}'
;

UPDATE examples

Partially updates a SCIM Group via PATCH operations (RFC 7644 Section 3.5.2). Supports add, remove, and replace operations on members, displayName, and externalId. For system groups (prefixed cloudflare-v1-), only member management operations are supported.

UPDATE cloudflare.iam.groups
SET
Operations = '{{ Operations }}',
schemas = '{{ schemas }}'
WHERE
account_id = '{{ account_id }}' --required
AND group_id = '{{ group_id }}' --required
AND schemas = '{{ schemas }}' --required
AND Operations = '{{ Operations }}' --required
RETURNING
contents;

DELETE examples

Deletes a SCIM Group (custom user groups only). System groups backed by Cloudflare permission groups cannot be deleted via SCIM. Returns 204 No Content on success.

DELETE FROM cloudflare.iam.groups
WHERE account_id = '{{ account_id }}' --required
AND group_id = '{{ group_id }}' --required
;