import 'package:cloudflare_dart/api.dart';All URIs are relative to https://api.cloudflare.com/client/v4
| Method | HTTP request | Description |
|---|---|---|
| workerRoutesCreateRoute | POST /zones/{zone_id}/workers/routes | Create Route |
| workerRoutesDeleteRoute | DELETE /zones/{zone_id}/workers/routes/{route_id} | Delete Route |
| workerRoutesGetRoute | GET /zones/{zone_id}/workers/routes/{route_id} | Get Route |
| workerRoutesListRoutes | GET /zones/{zone_id}/workers/routes | List Routes |
| workerRoutesUpdateRoute | PUT /zones/{zone_id}/workers/routes/{route_id} | Update Route |
WorkerRoutesCreateRoute200Response workerRoutesCreateRoute(zoneId, workersRoute)
Create Route
Creates a route that maps a URL pattern to a Worker.
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().getWorkerRoutesApi();
final String zoneId = zoneId_example; // String |
final WorkersRoute workersRoute = ; // WorkersRoute |
try {
final response = api.workerRoutesCreateRoute(zoneId, workersRoute);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerRoutesApi->workerRoutesCreateRoute: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| zoneId | String | ||
| workersRoute | WorkersRoute |
WorkerRoutesCreateRoute200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkerRoutesDeleteRoute200Response workerRoutesDeleteRoute(routeId, zoneId)
Delete Route
Deletes a route.
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().getWorkerRoutesApi();
final String routeId = routeId_example; // String |
final String zoneId = zoneId_example; // String |
try {
final response = api.workerRoutesDeleteRoute(routeId, zoneId);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerRoutesApi->workerRoutesDeleteRoute: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| routeId | String | ||
| zoneId | String |
WorkerRoutesDeleteRoute200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkerRoutesCreateRoute200Response workerRoutesGetRoute(routeId, zoneId)
Get Route
Returns information about a route, including URL pattern and Worker.
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().getWorkerRoutesApi();
final String routeId = routeId_example; // String |
final String zoneId = zoneId_example; // String |
try {
final response = api.workerRoutesGetRoute(routeId, zoneId);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerRoutesApi->workerRoutesGetRoute: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| routeId | String | ||
| zoneId | String |
WorkerRoutesCreateRoute200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkerRoutesListRoutes200Response workerRoutesListRoutes(zoneId)
List Routes
Returns routes for a zone.
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().getWorkerRoutesApi();
final String zoneId = zoneId_example; // String |
try {
final response = api.workerRoutesListRoutes(zoneId);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerRoutesApi->workerRoutesListRoutes: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| zoneId | String |
WorkerRoutesListRoutes200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkerRoutesCreateRoute200Response workerRoutesUpdateRoute(routeId, zoneId, workersRoute)
Update Route
Updates the URL pattern or Worker associated with a route.
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().getWorkerRoutesApi();
final String routeId = routeId_example; // String |
final String zoneId = zoneId_example; // String |
final WorkersRoute workersRoute = ; // WorkersRoute |
try {
final response = api.workerRoutesUpdateRoute(routeId, zoneId, workersRoute);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkerRoutesApi->workerRoutesUpdateRoute: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| routeId | String | ||
| zoneId | String | ||
| workersRoute | WorkersRoute |
WorkerRoutesCreateRoute200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]