Get Version Detail
GET/accounts/{account_id}/workers/scripts/{script_name}/versions/{version_id}
Retrieves detailed information about a specific version of a Workers script.
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 Version Detail
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workers/scripts/$SCRIPT_NAME/versions/$VERSION_ID \
-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": {
"resources": {
"bindings": [
{
"name": "MY_ENV_VAR",
"text": "my_data",
"type": "plain_text"
}
],
"script": {
"etag": "13a3240e8fb414561b0366813b0b8f42b3e6cfa0d9e70e99835dae83d0d8a794",
"handlers": [
"fetch"
],
"last_deployed_from": "api",
"named_handlers": [
{
"handlers": [
"fetch"
],
"name": "MyClass"
}
]
},
"script_runtime": {
"compatibility_date": "2022-11-08",
"compatibility_flags": [
"x"
],
"limits": {
"cpu_ms": 50
},
"migration_tag": "v1",
"usage_model": "standard"
}
},
"id": "18f97339-c287-4872-9bdd-e2135c07ec12",
"metadata": {
"author_email": "user@example.com",
"author_id": "408cbcdfd4dda4617efef40b04d168a1",
"created_on": "2022-11-08T17:19:29.176266Z",
"hasPreview": true,
"modified_on": "2022-11-08T17:19:29.176266Z",
"source": "api"
},
"number": 1
},
"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": {
"resources": {
"bindings": [
{
"name": "MY_ENV_VAR",
"text": "my_data",
"type": "plain_text"
}
],
"script": {
"etag": "13a3240e8fb414561b0366813b0b8f42b3e6cfa0d9e70e99835dae83d0d8a794",
"handlers": [
"fetch"
],
"last_deployed_from": "api",
"named_handlers": [
{
"handlers": [
"fetch"
],
"name": "MyClass"
}
]
},
"script_runtime": {
"compatibility_date": "2022-11-08",
"compatibility_flags": [
"x"
],
"limits": {
"cpu_ms": 50
},
"migration_tag": "v1",
"usage_model": "standard"
}
},
"id": "18f97339-c287-4872-9bdd-e2135c07ec12",
"metadata": {
"author_email": "user@example.com",
"author_id": "408cbcdfd4dda4617efef40b04d168a1",
"created_on": "2022-11-08T17:19:29.176266Z",
"hasPreview": true,
"modified_on": "2022-11-08T17:19:29.176266Z",
"source": "api"
},
"number": 1
},
"success": true
}