organizations
Creates, updates, deletes, gets or lists an organizations resource.
Overview
| Name | organizations |
| Type | Resource |
| Id | cloudflare.user.organizations |
Fields
The following fields are returned by SELECT queries:
- get
- list
Organization Details response
| Name | Datatype | Description |
|---|---|---|
errors | array | |
messages | array | |
result | object | |
success | boolean | Whether the API call was successful. (true) |
List Organizations response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | Organization name. (example: Cloudflare, Inc.) |
permissions | array | Access permissions for this User. |
roles | array | List of roles that a user has within an organization. |
status | string | Whether the user is a member of the organization or has an invitation pending. (member, invited) (example: member) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | organization_id | Gets a specific organization the user is associated with. | |
list | select | name, page, per_page, order, direction, match, status | Lists organizations the user is associated with. | |
delete | delete | organization_id | Removes association to an organization. |
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 |
|---|---|---|
organization_id | string | The organization ID. |
direction | string | |
match | string | |
name | string | |
order | string | |
page | number | |
per_page | number | |
status | string |
SELECT examples
- get
- list
Gets a specific organization the user is associated with.
SELECT
errors,
messages,
result,
success
FROM cloudflare.user.organizations
WHERE organization_id = '{{ organization_id }}' -- required
;
Lists organizations the user is associated with.
SELECT
id,
name,
permissions,
roles,
status
FROM cloudflare.user.organizations
WHERE name = '{{ name }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND order = '{{ order }}'
AND direction = '{{ direction }}'
AND match = '{{ match }}'
AND status = '{{ status }}'
;
DELETE examples
- delete
Removes association to an organization.
DELETE FROM cloudflare.user.organizations
WHERE organization_id = '{{ organization_id }}' --required
;