Get a function version by slug and version
GET
/v1/a/adapters/edge/functions/{slug}/{version}
const url = 'https://example.com/v1/a/adapters/edge/functions/example/1';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/1 \ --header 'Authorization: Bearer <token>'Permission
This operation needs the permission edge:function:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
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.
string
version
required
integer
Header Parameters
Section titled “Header Parameters”X-Account-Sid
string
Target account for principals broader than one account (tenant / account API key); account-scoped principals use their own.
Responses
Section titled “Responses”The version
Media typeapplication/json
object
ok
required
boolean
edgeFunction
required
object
slug
required
string
version
required
integer
original_code
required
string
Example
{ "ok": true}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.
Media typeapplication/json
object
ok
required
boolean
error
required
string
err_code
required
string
Example
{ "ok": false, "err_code": "UNAUTHORIZED"}Unauthorized
Forbidden
No version with these keys in the account
Media typeapplication/json
object
ok
required
boolean
error
required
string
err_code
required
string
Example
{ "ok": false, "error": "Function not found", "err_code": "NOT_FOUND"}The body, query or path params did not pass the zod schema
Media typeapplication/json
object
ok
required
boolean
error
required
string
issues
required
Zod issues as is
Array<object>
object
code
required
string
path
required
Array
message
required
string
Example
{ "ok": false, "error": "Validation failed"}Unexpected error, for example a database or a disk failure. The body
has err_code: INTERNAL_SERVER_ERROR.
Media typeapplication/json
object
ok
required
boolean
error
required
string
err_code
required
string
Example
{ "ok": false, "err_code": "UNAUTHORIZED"}Bad gateway (upstream adapter error)