Skip to content

Memory routes: update, delete

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

Reference for Memory, one group of Memory routes.

Memory.update

Changes the given properties of a Memory. Verb page.

Text
PATCH /{namespace}/memories/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Memory.
typelist of NounThe Nouns this Thing is an instance of.
outsidejsonThe ids this Thing has in outside tools, one per Integration, so a re-run matches instead of duplicating.
queryjsonThe saved query that defines a dynamic Collection.

Returns

OutputTypeRequiredDescription
memoryMemoryrequiredThe Memory.

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/memories/memory_Y52OcaSexq \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":["noun_v0akLUrXCN"]}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "memory": {
    "$id": "https://api.sb/leaseline.app/memories/memory_Y52OcaSexq",
    "$type": "Memory",
    "id": "Example id",
    "type": [
      "noun_v0akLUrXCN"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Memory.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Memory.delete

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

Text
DELETE /{namespace}/memories/{id}

Path: id. Emits Memory.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Memory.

Returns

OutputTypeRequiredDescription
memoryMemoryrequiredThe Memory.

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/memories/memory_Y52OcaSexq \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "memory": {
    "$id": "https://api.sb/leaseline.app/memories/memory_Y52OcaSexq",
    "$type": "Memory",
    "id": "Example id",
    "type": [
      "noun_v0akLUrXCN"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Memory.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}