accounts
Creates, updates, deletes, gets or lists an accounts resource.
Overview
| Name | accounts |
| Type | Resource |
| Id | cloudflare.organizations.accounts |
Fields
The following fields are returned by SELECT queries:
- list
The request has succeeded.
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
created_on | string (date-time) | |
settings | object | |
type | string | (standard, enterprise) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | organization_id | account_pubname, account_pubname.startsWith, account_pubname.endsWith, account_pubname.contains, name, name.startsWith, name.endsWith, name.contains, order_by, direction, page_token, page_size | Retrieve a list of accounts that belong to a specific 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 |
|---|---|---|
organization_id | string | The organization ID. |
account_pubname | string | (case-insensitive) Filter the list of accounts to where the account_pubname is equal to a particular string. |
account_pubname.contains | string | (case-insensitive) Filter the list of accounts to where the account_pubname contains a particular string. |
account_pubname.endsWith | string | (case-insensitive) Filter the list of accounts to where the account_pubname ends with a particular string. |
account_pubname.startsWith | string | (case-insensitive) Filter the list of accounts to where the account_pubname starts with a particular string. |
direction | string | Sort direction for the order_by field. Valid values: asc, desc. Defaults to asc when order_by is specified. |
name | string | (case-insensitive) Filter the list of accounts to where the name is equal to a particular string. |
name.contains | string | (case-insensitive) Filter the list of accounts to where the name contains a particular string. |
name.endsWith | string | (case-insensitive) Filter the list of accounts to where the name ends with a particular string. |
name.startsWith | string | (case-insensitive) Filter the list of accounts to where the name starts with a particular string. |
order_by | string | Field to order results by. Currently supported values: account_name. When not specified, results are ordered by internal account 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. |
SELECT examples
- list
Retrieve a list of accounts that belong to a specific organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
SELECT
id,
name,
created_on,
settings,
type
FROM cloudflare.organizations.accounts
WHERE organization_id = '{{ organization_id }}' -- required
AND account_pubname = '{{ account_pubname }}'
AND account_pubname.startsWith = '{{ account_pubname.startsWith }}'
AND account_pubname.endsWith = '{{ account_pubname.endsWith }}'
AND account_pubname.contains = '{{ account_pubname.contains }}'
AND name = '{{ name }}'
AND name.startsWith = '{{ name.startsWith }}'
AND name.endsWith = '{{ name.endsWith }}'
AND name.contains = '{{ name.contains }}'
AND order_by = '{{ order_by }}'
AND direction = '{{ direction }}'
AND page_token = '{{ page_token }}'
AND page_size = '{{ page_size }}'
;