Skip to main content

members

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

Overview

Namemembers
TypeResource
Idcloudflare.memberships.members

Fields

The following fields are returned by SELECT queries:

The request has succeeded.

NameDatatypeDescription
idstringOrganization Member ID (example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8)
create_timestring (date-time)
metaobject
statusstring (active, canceled)
update_timestring (date-time)
userobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectorganization_id, member_idRetrieve a single membership from an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
listselectorganization_idstatus, user.email, user.email.contains, user.email.startsWith, user.email.endsWith, page_token, page_sizeList memberships for an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
members_createinsertorganization_id, memberCreate a membership that grants access to a specific Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
members_deletedeleteorganization_id, member_idDelete a membership to a particular Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)

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
member_idstringThe account member ID.
organization_idstringThe organization ID.
page_sizeintegerThe amount of items to return. Defaults to 10.
page_tokenstringAn opaque token returned from the last list response that when provided will retrieve the next page. Parameters used to filter the retrieved list must remain in subsequent requests with a page token.
statusarrayFilter the list of memberships by membership status.
user.emailstringFilter the list of memberships for a specific email.
user.email.containsstringFilter the list of memberships for a specific email that contains a substring.
user.email.endsWithstringFilter the list of memberships for a specific email that ends with a substring.
user.email.startsWithstringFilter the list of memberships for a specific email that starts with a substring.

SELECT examples

Retrieve a single membership from an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)

SELECT
id,
create_time,
meta,
status,
update_time,
user
FROM cloudflare.memberships.members
WHERE organization_id = '{{ organization_id }}' -- required
AND member_id = '{{ member_id }}' -- required
;

INSERT examples

Create a membership that grants access to a specific Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)

INSERT INTO cloudflare.memberships.members (
member,
organization_id
)
SELECT
'{{ member }}' /* required */,
'{{ organization_id }}'
RETURNING
errors,
messages,
result,
success
;

DELETE examples

Delete a membership to a particular Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)

DELETE FROM cloudflare.memberships.members
WHERE organization_id = '{{ organization_id }}' --required
AND member_id = '{{ member_id }}' --required
;