members
Creates, updates, deletes, gets or lists a members resource.
Overview
| Name | members |
| Type | Resource |
| Id | cloudflare.memberships.members |
Fields
The following fields are returned by SELECT queries:
- get
- list
The request has succeeded.
| Name | Datatype | Description |
|---|---|---|
id | string | Organization Member ID (example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8) |
create_time | string (date-time) | |
meta | object | |
status | string | (active, canceled) |
update_time | string (date-time) | |
user | object |
The request has succeeded.
| Name | Datatype | Description |
|---|---|---|
id | string | Organization Member ID (example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8) |
create_time | string (date-time) | |
meta | object | |
status | string | (active, canceled) |
update_time | string (date-time) | |
user | object |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | organization_id, member_id | Retrieve a single membership from an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) | |
list | select | organization_id | status, user.email, user.email.contains, user.email.startsWith, user.email.endsWith, page_token, page_size | List memberships for an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) |
members_create | insert | organization_id, member | Create a membership that grants access to a specific Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) | |
members_delete | delete | organization_id, member_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
member_id | string | The account member ID. |
organization_id | string | The organization ID. |
page_size | integer | The amount of items to return. Defaults to 10. |
page_token | string | An 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. |
status | array | Filter the list of memberships by membership status. |
user.email | string | Filter the list of memberships for a specific email. |
user.email.contains | string | Filter the list of memberships for a specific email that contains a substring. |
user.email.endsWith | string | Filter the list of memberships for a specific email that ends with a substring. |
user.email.startsWith | string | Filter the list of memberships for a specific email that starts with a substring. |
SELECT examples
- get
- list
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
;
List memberships for 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 status = '{{ status }}'
AND user.email = '{{ user.email }}'
AND user.email.contains = '{{ user.email.contains }}'
AND user.email.startsWith = '{{ user.email.startsWith }}'
AND user.email.endsWith = '{{ user.email.endsWith }}'
AND page_token = '{{ page_token }}'
AND page_size = '{{ page_size }}'
;
INSERT examples
- members_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: members
props:
- name: organization_id
value: "{{ organization_id }}"
description: Required parameter for the members resource.
- name: member
value:
status: "{{ status }}"
user:
email: "{{ email }}"
DELETE examples
- members_delete
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
;