Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idcloudflare.organizations.accounts

Fields

The following fields are returned by SELECT queries:

The request has succeeded.

NameDatatypeDescription
idstring
namestring
created_onstring (date-time)
settingsobject
typestring (standard, enterprise)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectorganization_idaccount_pubname, account_pubname.startsWith, account_pubname.endsWith, account_pubname.contains, name, name.startsWith, name.endsWith, name.contains, order_by, direction, page_token, page_sizeRetrieve 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.

NameDatatypeDescription
organization_idstringThe organization ID.
account_pubnamestring(case-insensitive) Filter the list of accounts to where the account_pubname is equal to a particular string.
account_pubname.containsstring(case-insensitive) Filter the list of accounts to where the account_pubname contains a particular string.
account_pubname.endsWithstring(case-insensitive) Filter the list of accounts to where the account_pubname ends with a particular string.
account_pubname.startsWithstring(case-insensitive) Filter the list of accounts to where the account_pubname starts with a particular string.
directionstringSort direction for the order_by field. Valid values: asc, desc. Defaults to asc when order_by is specified.
namestring(case-insensitive) Filter the list of accounts to where the name is equal to a particular string.
name.containsstring(case-insensitive) Filter the list of accounts to where the name contains a particular string.
name.endsWithstring(case-insensitive) Filter the list of accounts to where the name ends with a particular string.
name.startsWithstring(case-insensitive) Filter the list of accounts to where the name starts with a particular string.
order_bystringField to order results by. Currently supported values: account_name. When not specified, results are ordered by internal account 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.

SELECT examples

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 }}'
;