Interface .deprecate
POST /{namespace}/interfaces/{interface}/deprecate
Deprecate marks an API version for retirement, posts its sunset date and lists each Tenant still pinned to it.
- Noun
- Interface
- Mode
do- Event
Interface.deprecated
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
interface | Interface | required | The API. |
version | string | required | The version to retire, such as v1. |
sunsetAt | date | required | The date it stops serving, once no Tenant pins it. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
interface | Interface | required | The API, with the version deprecated. |
Effects
| Fact | Value |
|---|---|
| Action class | None: no approval rule names it, so it runs within its seat's Permissions and Limits |
| Stakes | The Startup's own records only |
| Door | Two-way: it runs at once |
| Modes | try previews it and stores nothing; send returns a pending Action; do (default) waits for the result |
| Idempotent | Only with a key: a repeat with the same Idempotency-Key and input returns the first Action, the same key with other input is refused with 409, and a repeat without a key runs again |
| Undo | Action.undo reverses it |
| Emits | Interface.deprecated |
| Performed by | The Engineering Lead |
- Posts the sunset date to the Changelog and adds
DeprecationandSunsetheaders to every response of that version.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
interface is missing, or is not a interface | invalid-input | Send interface as a interface, then call it again. | None. |
version is missing, or is not a string | invalid-input | Send version as a string, then call it again. | None. |
sunsetAt is missing, or is not a date | invalid-input | Send sunsetAt as a date, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, no delay window |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval, which a Human answers: the owner of record, or a Human they named to approve for the Founder seat. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |
To retry, send the same Idempotency-Key: the retry returns the first Action and runs nothing twice. A new key runs the call again.