List Workers
GET/accounts/{account_id}/workers/scripts
Fetch a list of uploaded workers.
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)
List Workers
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workers/scripts \
-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": [
{
"id": "my-workers-script",
"compatibility_date": "2021-01-01",
"compatibility_flags": [
"nodejs_compat"
],
"created_on": "2017-01-01T00:00:00Z",
"etag": "ea95132c15732412d22c1476fa83f27a",
"handlers": [
"fetch",
"scheduled"
],
"has_assets": false,
"has_modules": false,
"last_deployed_from": "wrangler",
"logpush": false,
"migration_tag": "v1",
"modified_on": "2017-01-01T00:00:00Z",
"named_handlers": [
{
"handlers": [
"class"
],
"name": "MyDurableObject"
}
],
"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
}
},
"placement": {
"mode": "smart",
"last_analyzed_at": "2025-01-01T00:00:00Z",
"status": "SUCCESS"
},
"placement_mode": "smart",
"placement_status": "SUCCESS",
"routes": [
{
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"pattern": "example.com/*",
"script": "my-workers-script"
}
],
"tag": "e8f70fdbc8b1fb0b8ddb1af166186758",
"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": [
{
"id": "my-workers-script",
"compatibility_date": "2021-01-01",
"compatibility_flags": [
"nodejs_compat"
],
"created_on": "2017-01-01T00:00:00Z",
"etag": "ea95132c15732412d22c1476fa83f27a",
"handlers": [
"fetch",
"scheduled"
],
"has_assets": false,
"has_modules": false,
"last_deployed_from": "wrangler",
"logpush": false,
"migration_tag": "v1",
"modified_on": "2017-01-01T00:00:00Z",
"named_handlers": [
{
"handlers": [
"class"
],
"name": "MyDurableObject"
}
],
"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
}
},
"placement": {
"mode": "smart",
"last_analyzed_at": "2025-01-01T00:00:00Z",
"status": "SUCCESS"
},
"placement_mode": "smart",
"placement_status": "SUCCESS",
"routes": [
{
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"pattern": "example.com/*",
"script": "my-workers-script"
}
],
"tag": "e8f70fdbc8b1fb0b8ddb1af166186758",
"tags": [
"my-team",
"my-public-api"
],
"tail_consumers": [
{
"service": "my-log-consumer",
"environment": "production",
"namespace": "my-namespace"
}
],
"usage_model": "standard"
}
],
"success": true
}