import 'package:cloudflare_dart/api.dart';All URIs are relative to https://api.cloudflare.com/client/v4
| Method | HTTP request | Description |
|---|---|---|
| accountApiTokensCreateToken | POST /accounts/{account_id}/tokens | Create Token |
| accountApiTokensDeleteToken | DELETE /accounts/{account_id}/tokens/{token_id} | Delete Token |
| accountApiTokensListPermissionGroups | GET /accounts/{account_id}/tokens/permission_groups | List Permission Groups |
| accountApiTokensListTokens | GET /accounts/{account_id}/tokens | List Tokens |
| accountApiTokensRollToken | PUT /accounts/{account_id}/tokens/{token_id}/value | Roll Token |
| accountApiTokensTokenDetails | GET /accounts/{account_id}/tokens/{token_id} | Token Details |
| accountApiTokensUpdateToken | PUT /accounts/{account_id}/tokens/{token_id} | Update Token |
| accountApiTokensVerifyToken | GET /accounts/{account_id}/tokens/verify | Verify Token |
IamSingleTokenCreateResponse accountApiTokensCreateToken(accountId, iamCreatePayload)
Create Token
Create a new Account Owned API token.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final IamCreatePayload iamCreatePayload = ; // IamCreatePayload |
try {
final response = api.accountApiTokensCreateToken(accountId, iamCreatePayload);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensCreateToken: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| iamCreatePayload | IamCreatePayload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamApiResponseSingleId accountApiTokensDeleteToken(accountId, tokenId)
Delete Token
Destroy an Account Owned API token.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final String tokenId = tokenId_example; // String |
try {
final response = api.accountApiTokensDeleteToken(accountId, tokenId);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensDeleteToken: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| tokenId | String |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamPermissionsGroupResponseCollection accountApiTokensListPermissionGroups(accountId, name, scope)
List Permission Groups
Find all available permission groups for Account Owned API Tokens
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final String name = Account%20Settings%20Write; // String | Filter by the name of the permission group. The value must be URL-encoded.
final String scope = com.cloudflare.api.account.zone; // String | Filter by the scope of the permission group. The value must be URL-encoded.
try {
final response = api.accountApiTokensListPermissionGroups(accountId, name, scope);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensListPermissionGroups: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| name | String | Filter by the name of the permission group. The value must be URL-encoded. | [optional] |
| scope | String | Filter by the scope of the permission group. The value must be URL-encoded. | [optional] |
IamPermissionsGroupResponseCollection
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamCollectionTokensResponse accountApiTokensListTokens(accountId, page, perPage, direction)
List Tokens
List all Account Owned API tokens created for this account.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final num page = 8.14; // num |
final num perPage = 8.14; // num |
final String direction = desc; // String |
try {
final response = api.accountApiTokensListTokens(accountId, page, perPage, direction);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensListTokens: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| page | num | [optional] [default to 1] | |
| perPage | num | [optional] [default to 20] | |
| direction | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamResponseSingleValue accountApiTokensRollToken(accountId, tokenId, body)
Roll Token
Roll the Account Owned API token secret.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final String tokenId = tokenId_example; // String |
final JsonObject body = Object; // JsonObject |
try {
final response = api.accountApiTokensRollToken(accountId, tokenId, body);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensRollToken: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| tokenId | String | ||
| body | JsonObject |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamSingleTokenResponse accountApiTokensTokenDetails(accountId, tokenId)
Token Details
Get information about a specific Account Owned API token.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final String tokenId = tokenId_example; // String |
try {
final response = api.accountApiTokensTokenDetails(accountId, tokenId);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensTokenDetails: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| tokenId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamSingleTokenResponse accountApiTokensUpdateToken(accountId, tokenId, iamTokenBody)
Update Token
Update an existing token.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
final String tokenId = tokenId_example; // String |
final IamTokenBody iamTokenBody = ; // IamTokenBody |
try {
final response = api.accountApiTokensUpdateToken(accountId, tokenId, iamTokenBody);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensUpdateToken: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier | ||
| tokenId | String | ||
| iamTokenBody | IamTokenBody |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IamTokenVerifyResponseSingleSegment accountApiTokensVerifyToken(accountId)
Verify Token
Test whether a token works.
import 'package:cloudflare_dart/api.dart';
final api = CloudflareDart().getAccountOwnedAPITokensApi();
final IamAccountIdentifier accountId = ; // IamAccountIdentifier |
try {
final response = api.accountApiTokensVerifyToken(accountId);
print(response);
} catch on DioException (e) {
print('Exception when calling AccountOwnedAPITokensApi->accountApiTokensVerifyToken: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | IamAccountIdentifier |
IamTokenVerifyResponseSingleSegment
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]