POST /functions/deletions
Delete a function revision
Delete a deployed revision of a function. Use when the user explicitly asks to take a function offline. Before: the user's clear yes. Returns the job (id, status); then get_function_job (needs job read access). Scope: functions:deploy.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string · required |
Request body
application/json
| Field | Type | Description |
|---|---|---|
name | string · required | Function name: lowercase letters, digits and hyphens, starting with a letter. |
revision_sha256 | string · required | Revision to delete, from get_function_job (needs job read access). |
environment | "test" | "live" · required | Environment: it must be the environment of the key. |
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/functions/deletions" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Idempotency-Key: <unique-key>" \
-H "Content-Type: application/json" \
-d '{"name": "string", "revision_sha256": "string", "environment": "test"}'