Get Settings
GET/accounts/{account_id}/workers/scripts/{script_name}/settings
Get metadata and config, such as bindings or usage model.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Path Parameters
Get Settings
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workers/scripts/$SCRIPT_NAME/settings \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"annotations": {
"workers/message": "Fixed bug.",
"workers/tag": "v1.0.1",
"workers/triggered_by": "upload"
},
"bindings": [
{
"name": "MY_ENV_VAR",
"text": "my_data",
"type": "plain_text"
}
],
"cache_options": {
"enabled": true,
"cross_version_cache": true
},
"compatibility_date": "2021-01-01",
"compatibility_flags": [
"nodejs_compat"
],
"exports_reconciliation": {
"created": [
"string"
],
"deleted": [
"string"
],
"info": [
{
"class": "class",
"message": "message",
"scenario": "code_class_not_in_exports",
"namespace_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"referencing_scripts": [
"string"
]
}
],
"removable_entries": [
"string"
],
"renamed": [
{
"from": "from",
"to": "to"
}
],
"transfer_pending": [
{
"class": "class",
"from": "from"
}
],
"transferred": [
{
"class": "class",
"phase": "committed",
"to": "to"
}
],
"updated": [
"string"
],
"warnings": [
{
"class": "class",
"message": "message",
"scenario": "code_class_not_in_exports",
"namespace_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
]
},
"limits": {
"cpu_ms": 50,
"subrequests": 1000
},
"logpush": false,
"observability": {
"enabled": true,
"head_sampling_rate": 0.1,
"logs": {
"enabled": true,
"invocation_logs": true,
"destinations": [
"cloudflare"
],
"head_sampling_rate": 0.1,
"persist": true
},
"traces": {
"destinations": [
"cloudflare"
],
"enabled": true,
"head_sampling_rate": 0.1,
"persist": true,
"propagation_policy": "authenticated"
}
},
"placement": {
"mode": "smart"
},
"tags": [
"my-team",
"my-public-api"
],
"tail_consumers": [
{
"service": "my-log-consumer",
"environment": "production",
"namespace": "my-namespace"
}
],
"usage_model": "standard"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"annotations": {
"workers/message": "Fixed bug.",
"workers/tag": "v1.0.1",
"workers/triggered_by": "upload"
},
"bindings": [
{
"name": "MY_ENV_VAR",
"text": "my_data",
"type": "plain_text"
}
],
"cache_options": {
"enabled": true,
"cross_version_cache": true
},
"compatibility_date": "2021-01-01",
"compatibility_flags": [
"nodejs_compat"
],
"exports_reconciliation": {
"created": [
"string"
],
"deleted": [
"string"
],
"info": [
{
"class": "class",
"message": "message",
"scenario": "code_class_not_in_exports",
"namespace_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"referencing_scripts": [
"string"
]
}
],
"removable_entries": [
"string"
],
"renamed": [
{
"from": "from",
"to": "to"
}
],
"transfer_pending": [
{
"class": "class",
"from": "from"
}
],
"transferred": [
{
"class": "class",
"phase": "committed",
"to": "to"
}
],
"updated": [
"string"
],
"warnings": [
{
"class": "class",
"message": "message",
"scenario": "code_class_not_in_exports",
"namespace_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
]
},
"limits": {
"cpu_ms": 50,
"subrequests": 1000
},
"logpush": false,
"observability": {
"enabled": true,
"head_sampling_rate": 0.1,
"logs": {
"enabled": true,
"invocation_logs": true,
"destinations": [
"cloudflare"
],
"head_sampling_rate": 0.1,
"persist": true
},
"traces": {
"destinations": [
"cloudflare"
],
"enabled": true,
"head_sampling_rate": 0.1,
"persist": true,
"propagation_policy": "authenticated"
}
},
"placement": {
"mode": "smart"
},
"tags": [
"my-team",
"my-public-api"
],
"tail_consumers": [
{
"service": "my-log-consumer",
"environment": "production",
"namespace": "my-namespace"
}
],
"usage_model": "standard"
},
"success": true
}