Download OpenAPI specification:Download
The Cloudflare Client API
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| properties | Array of strings (properties) unique Items Value: "auth_id_characteristics" Example: properties=auth_id_characteristics Requests information about certain properties. |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "auth_id_characteristics": [
- {
- "type": "header",
- "name": "authorization"
}
]
}
}| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
Array of objects (characteristics) <= 10 items unique |
{- "auth_id_characteristics": [
- {
- "type": "header",
- "name": "authorization"
}
]
}{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": { }
}| operation_id required | string (uuid) <= 36 characters Example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 UUID |
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| feature | Array of strings unique Items Enum: "thresholds" "parameter_schemas" Example: feature=thresholds Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "operation_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- "method": "GET",
- "host": "www.example.com",
- "endpoint": "/api/v1/users/{var1}",
- "last_updated": "2014-01-01T05:20:00.12345Z",
- "features": {
- "thresholds": {
- "period_seconds": 0,
- "suggested_threshold": 0,
- "p50": 0,
- "p90": 0,
- "p99": 0,
- "requests": 0,
- "auth_id_tokens": 0,
- "data_points": 0,
- "last_updated": "2014-01-01T05:20:00.12345Z"
}
}
}
}| operation_id required | string (uuid) <= 36 characters Example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 UUID |
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": { }
}| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| per_page | number (per_page) [ 5 .. 50 ] Default: 20 Maximum number of results per page. |
| order | string Enum: "method" "host" "endpoint" "thresholds.$key" Example: order=method Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., thresholds.suggested_threshold. |
| host | Array of strings unique Example: host=api.cloudflare.com Filter results to only include the specified hosts. |
| method | Array of strings unique Example: method=GET Filter results to only include the specified HTTP methods. |
| endpoint | string Example: endpoint=/api/v1 Filter results to only include endpoints containing this pattern. |
| page | number >= 1 Default: 1 Page number of paginated results. |
| feature | Array of strings unique Items Enum: "thresholds" "parameter_schemas" Example: feature=thresholds Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. |
| direction | string Enum: "asc" "desc" Example: direction=desc Direction to order results. |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "0": {
- "operation_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- "method": "GET",
- "host": "www.example.com",
- "endpoint": "/api/v1/users/{var1}",
- "last_updated": "2014-01-01T05:20:00.12345Z",
- "features": {
- "thresholds": {
- "period_seconds": 0,
- "suggested_threshold": 0,
- "p50": 0,
- "p90": 0,
- "p99": 0,
- "requests": 0,
- "auth_id_tokens": 0,
- "data_points": 0,
- "last_updated": "2014-01-01T05:20:00.12345Z"
}
}
}
}, - "result_info": {
- "page": 1,
- "per_page": 20,
- "count": 1,
- "total_count": 500
}
}Add one or more operations to a zone. Endpoints can contain path variables. Host, method, endpoint will be normalized to a canoncial form when creating an operation and must be unique on the zone. Inserting an operation that matches an existing one will return the record of the already existing operation and update its last_updated date.
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| host | string <hostname> (host) <= 255 characters RFC3986-compliant host. |
| method | string (method) Enum: "GET" "POST" "HEAD" "OPTIONS" "PUT" "DELETE" "CONNECT" "PATCH" "TRACE" The HTTP method used to access the endpoint. |
| endpoint | string <uri-template> (endpoint) <= 4096 characters ^/.*$ The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. |
[- {
- "host": "www.example.com",
- "method": "GET",
- "endpoint": "/api/v1/users/{var1}"
}
]{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": [
- {
- "operation_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- "method": "GET",
- "host": "www.example.com",
- "endpoint": "/api/v1/users/{var1}",
- "last_updated": "2014-01-01T05:20:00.12345Z",
- "features": null
}
], - "result_info": {
- "page": 1,
- "per_page": 20,
- "count": 1,
- "total_count": 2000
}
}| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| host | Array of strings unique Example: host=www.example.com Receive schema only for the given host(s). |
| feature | Array of strings unique Items Enum: "thresholds" "parameter_schemas" Example: feature=thresholds Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "timestamp": "string",
- "schemas": [
- {
- "openapi": "3.0.0",
- "servers": [
- {
- "url": "www.example.com"
}
], - "info": {
- "title": "OpenAPI JSON schema for www.example.com",
- "version": "1.0"
}, - "paths": {
- "/api/v1/users/{var1}": {
- "get": {
- "parameters": [
- {
- "in": "path",
- "name": "var1",
- "required": true,
- "schema": {
- "type": "string"
}
}
], - "x-cf-threshold": {
- "period_seconds": 600,
- "suggested_threshold": 18,
- "p50": 3,
- "p90": 7,
- "p99": 11,
- "requests": 66886,
- "auth_id_tokens": 7262,
- "data_points": 10189,
- "last_udated": "2014-01-01T05:20:00.12345Z"
}
}
}, - "... Further paths ...": { }
}
}
]
}
}Retrieve the most up to date view of API Discovery on a zone.
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "timestamp": "string",
- "schemas": [
- {
- "openapi": "3.0.0",
- "servers": [
- {
- "url": "www.example.com"
}
], - "info": {
- "title": "OpenAPI JSON schema for www.example.com",
- "version": "1.0"
}, - "paths": {
- "/api/v1/users/{var1}": {
- "get": {
- "parameters": [
- {
- "in": "path",
- "name": "var1",
- "required": true,
- "schema": {
- "type": "string"
}
}
]
}
}, - "... Further paths ...": { }
}
}
]
}
}List all currently configured sequence rules.
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| page | number >= 1 Default: 1 Page number of paginated results. |
| per_page | number [ 5 .. 50 ] Default: 20 Maximum number of results per page. |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result_info": {
- "page": 1,
- "per_page": 20,
- "count": 1,
- "total_count": 2000
}, - "result": {
- "rules": [
- {
- "id": "0d9bf70c-92e1-4bb3-9411-34a3bcc59003",
- "title": "string",
- "kind": "block",
- "action": "block",
- "sequence": [
- "0d9bf70c-92e1-4bb3-9411-34a3bcc59003"
], - "priority": 0,
- "last_updated": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}
}Replace the existing set of rules with the ones provided.
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
Array of objects (seq-rule-request) |
{- "rules": [
- {
- "title": "string",
- "kind": "block",
- "action": "block",
- "sequence": [
- "0d9bf70c-92e1-4bb3-9411-34a3bcc59003"
], - "priority": 0
}
]
}{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "rules": [
- {
- "id": "0d9bf70c-92e1-4bb3-9411-34a3bcc59003",
- "title": "string",
- "kind": "block",
- "action": "block",
- "sequence": [
- "0d9bf70c-92e1-4bb3-9411-34a3bcc59003"
], - "priority": 0,
- "last_updated": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}
}Adds a single rule to the set of sequence rules.
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| title | string [ 1 .. 50 ] characters A short description of the rule |
| kind | string Enum: "block" "allow" Describes if the sequence should be allowed or forbidden |
| action | string Enum: "block" "log" The action that should be performed when the sequence rules is activated |
| sequence | Array of strings (schemas-uuid) [ items <= 36 characters ] References to operations from endpoint management which form a sequence. Operations must all have the same host. |
| priority | integer Default: 0 An indicator which precedence this rules has over other rules. Rules with a higher priority number are executed before rules with a lower priority number. Rules with the same priority are executed in order that they were added. |
{- "title": "string",
- "kind": "block",
- "action": "block",
- "sequence": [
- "0d9bf70c-92e1-4bb3-9411-34a3bcc59003"
], - "priority": 0
}{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "id": "0d9bf70c-92e1-4bb3-9411-34a3bcc59003",
- "title": "string",
- "kind": "block",
- "action": "block",
- "sequence": [
- "0d9bf70c-92e1-4bb3-9411-34a3bcc59003"
], - "priority": 0,
- "last_updated": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
}Removes a single rule from the set of sequence rules.
| zone_id required | string (identifier) <= 32 characters Example: 023e105f4ecef8ad9ca31a8372d0c353 Identifier |
| rule_id required | string (schemas-uuid) <= 36 characters Example: 0d9bf70c-92e1-4bb3-9411-34a3bcc59003 UUID identifier |
{- "success": true,
- "errors": [ ],
- "messages": [ ],
- "result": {
- "id": "0d9bf70c-92e1-4bb3-9411-34a3bcc59003"
}
}