import 'package:cloudflare_dart/api.dart';All URIs are relative to https://api.cloudflare.com/client/v4
| Method | HTTP request | Description |
|---|---|---|
| workerDomainAttachToDomain | PUT /accounts/{account_id}/workers/domains | Attach to Domain |
| workerDomainDetachFromDomain | DELETE /accounts/{account_id}/workers/domains/{domain_id} | Detach from Domain |
| workerDomainGetADomain | GET /accounts/{account_id}/workers/domains/{domain_id} | Get a Domain |
| workerDomainListDomains | GET /accounts/{account_id}/workers/domains | List Domains |
WorkersDomainResponseSingle workerDomainAttachToDomain(accountId, workerDomainAttachToDomainRequest)
Attach to Domain
Attaches a Worker to a zone and hostname.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getWorkerDomainApi();
final String accountId = accountId_example; // String |
final WorkerDomainAttachToDomainRequest workerDomainAttachToDomainRequest = ; // WorkerDomainAttachToDomainRequest |
try {
final response = api.workerDomainAttachToDomain(accountId, workerDomainAttachToDomainRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerDomainApi->workerDomainAttachToDomain: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| workerDomainAttachToDomainRequest | WorkerDomainAttachToDomainRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
workerDomainDetachFromDomain(accountId, domainId)
Detach from Domain
Detaches a Worker from a zone and hostname.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getWorkerDomainApi();
final String accountId = accountId_example; // String |
final String domainId = domainId_example; // String |
try {
api.workerDomainDetachFromDomain(accountId, domainId);
} catch on DioException (e) {
print('Exception when calling WorkerDomainApi->workerDomainDetachFromDomain: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| domainId | String |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkersDomainResponseSingle workerDomainGetADomain(accountId, domainId)
Get a Domain
Gets a Worker domain.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getWorkerDomainApi();
final String accountId = accountId_example; // String |
final String domainId = domainId_example; // String |
try {
final response = api.workerDomainGetADomain(accountId, domainId);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerDomainApi->workerDomainGetADomain: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| domainId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkersDomainResponseCollection workerDomainListDomains(accountId, zoneName, service, zoneId, hostname, environment)
List Domains
Lists all Worker Domains for an account.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getWorkerDomainApi();
final String accountId = accountId_example; // String |
final String zoneName = zoneName_example; // String |
final String service = service_example; // String |
final String zoneId = zoneId_example; // String |
final String hostname = foo.example.com; // String |
final String environment = production; // String |
try {
final response = api.workerDomainListDomains(accountId, zoneName, service, zoneId, hostname, environment);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerDomainApi->workerDomainListDomains: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | String | ||
| zoneName | String | [optional] | |
| service | String | [optional] | |
| zoneId | String | [optional] | |
| hostname | String | [optional] | |
| environment | String | [optional] |
WorkersDomainResponseCollection
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]