List every version of a function
const url = 'https://example.com/v1/a/adapters/edge/functions/example/versions';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/a/adapters/edge/functions/example/versions \ --header 'Authorization: Bearer <token>'Newest version first. An unknown slug gives an empty list, not 404.
Permission
This operation needs the permission edge:function:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Function name inside the account. Needs at least one [A-Za-z0-9_]
character and must not be by-id. Other characters are not rejected.
Header Parameters
Section titled “Header Parameters”Target account for principals broader than one account (tenant / account API key); account-scoped principals use their own.
Responses
Section titled “Responses”All versions of the slug
object
object
See the status lifecycle in FLOW.md
Keys found in the code as string literals of storage.get /
storage.unpack (reads) or storage.set (writes). Keys built at
runtime are not found.
Keys found in the code as string literals of storage.get /
storage.unpack (reads) or storage.set (writes). Keys built at
runtime are not found.
Example
{ "ok": true, "versions": [ { "status": "deployed" } ]}Domain error. A failed bundle comes as 400 with
err_code: INTERNAL_SERVER_ERROR. On a run route a bundle that could
not be rebuilt is this 400 too.
object
Example
{ "ok": false, "err_code": "UNAUTHORIZED"}Unauthorized
Forbidden
The body, query or path params did not pass the zod schema
object
Zod issues as is
object
Example
{ "ok": false, "error": "Validation failed"}Unexpected error, for example a database or a disk failure. The body
has err_code: INTERNAL_SERVER_ERROR.
object
Example
{ "ok": false, "err_code": "UNAUTHORIZED"}Bad gateway (upstream adapter error)