Skip to content
Management API Reference

[Alpha] Retrieve a worker

get/v2/projects/{ref}/workers/{name}

Returns a worker along with its instance tally. Poll this after a deploy until build_state leaves building.

OAuth scopes

  • edge_functions:read

The fine-grained token must include the following permissions to access this endpoint:

  • workers_read

Path parameters

  • ref
    Required
    string

    Project ref

  • name
    Required
    string

Response codes

  • 200
  • 401
  • 403
  • 429

Response (200)

{
"data": {
"type": "project_worker",
"id": "hello-world",
"attributes": {
"spec": {
"runtime": "node",
"size": "2gb-1vcpu",
"exposure": "public",
"instances": 1
},
"build_state": "building",
"secret_generation": "lorem",
"state_reason": "lorem",
"image_version": "lorem",
"deleting": true,
"instances": {
"declared": -9007199254740991,
"live": -9007199254740991,
"ready": -9007199254740991,
"stale": -9007199254740991
},
"instances_error": "lorem"
}
}
}