# Get a function version by id GET /v1/a/adapters/edge/functions/by-id/{id} Select code sample ``` const url = 'https://example.com/v1/a/adapters/edge/functions/by-id/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; 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/by-id/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer ' ``` - /v1/a/adapters/edge/functions/by-id/{id} ## Permission This operation needs the permission [`edge:function:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#edge-function-read). ## Authorizations - **[bearerAuth](https://docs.aiva.apifonica.com/api/account/#bearerauth)** ## Parameters ### Path Parameters **id** required string format: uuid Version id, a UUID ### 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 ### 200 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 } ``` ### 400 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 Allowed values: UNAUTHORIZED FORBIDDEN NOT\_FOUND BAD\_REQUEST INTERNAL\_SERVER\_ERROR VALIDATION\_ERROR ##### Example ``` { "ok": false, "err_code": "UNAUTHORIZED" } ``` ### 401 Unauthorized ### 403 Forbidden ### 404 No version with these keys in the account Media typeapplication/json object **ok** required boolean **error** required string **err\_code** required string Allowed values: UNAUTHORIZED FORBIDDEN NOT\_FOUND BAD\_REQUEST INTERNAL\_SERVER\_ERROR VALIDATION\_ERROR ##### Example ``` { "ok": false, "error": "Function not found", "err_code": "NOT_FOUND" } ``` ### 422 The body, query or path params did not pass the zod schema Media typeapplication/json object **ok** required boolean **error** required string Allowed values: Validation failed **issues** required Zod issues as is Array\ object **code** required string **path** required Array **message** required string ##### Example ``` { "ok": false, "error": "Validation failed" } ``` ### 500 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 Allowed values: UNAUTHORIZED FORBIDDEN NOT\_FOUND BAD\_REQUEST INTERNAL\_SERVER\_ERROR VALIDATION\_ERROR ##### Example ``` { "ok": false, "err_code": "UNAUTHORIZED" } ``` ### 502 Bad gateway (upstream adapter error)