Skip to content

Implementation routes: update, delete

The Implementation Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Implementation, one group of Implementation routes.

Implementation.update

Changes the given properties of an Implementation. Verb page.

Text
PATCH /{namespace}/implementations/{id}

Path: id. Body, as JSON: the other inputs. Emits Implementation.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Implementation.
kindstringOne of managed, custom, or external.
endpointurlFor an external Implementation, where api.sb routes each call.
deliverBydateFor a declared Implementation: when a Function runs the Verb; a missed date refunds every reserve.

Returns

OutputTypeRequiredDescription
implementationImplementationrequiredThe Implementation.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X PATCH https://api.sb/leaseline.app/implementations/implementation_gnulUgZJ7A \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"managed"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "implementation": {
    "$id": "https://api.sb/leaseline.app/implementations/implementation_gnulUgZJ7A",
    "$type": "Implementation",
    "kind": "managed"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Implementation.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Implementation.delete

Deletes an Implementation: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/implementations/{id}

Path: id. Emits Implementation.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Implementation.

Returns

OutputTypeRequiredDescription
implementationImplementationrequiredThe Implementation.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X DELETE https://api.sb/leaseline.app/implementations/implementation_gnulUgZJ7A \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "implementation": {
    "$id": "https://api.sb/leaseline.app/implementations/implementation_gnulUgZJ7A",
    "$type": "Implementation",
    "kind": "managed"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Implementation.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}