Rensei docs

Read the current resumable topology for one program ledger.

One authoritative read joins the immutable program event stream to current session-ledger edges and nodes, and inlines the most recent program records so a cold session needs one call rather than three. Terminal children are absent even when no later program event was appended. mailbox counts one reader's unread mail (broadcasts plus records addressed to it or to one of the comma-separated roles it claims): the authenticated principal by default, or readerSessionId when named. It is null when no reader can be attributed.

GET
/api/cli/programs/{programId}/resume

Authorization

headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Path Parameters

programId*string
Match^prog_[0-9a-f]{32}$

Query Parameters

readerSessionId?string
Length1 <= length <= 256
roles?string
Lengthlength <= 1024

Response Body

Program resume projection.

application/json
  1. response
ledgerVersion*string
programVersion*string
program*
resumeCursor*
lastEvent*||||||null
openWaves*array<>
inFlightChildren*array<>
latestRecords*array<>
Itemsitems <= 50
latestByKind*
state*array<>
Itemsitems <= 100
stateTruncated*boolean
stateKeyCount*integer
Range0 <= value <= 9007199254740991
mailbox*|null
Example Request
curl -X GET 'https://app.rensei.ai/api/cli/programs/string/resume'
Example Response
{  "ledgerVersion": "rensei.session-ledger/v1alpha1",  "programVersion": "rensei.session-ledger.program/v1alpha1",  "program": {    "ledgerVersion": "rensei.session-ledger/v1alpha1",    "programVersion": "rensei.session-ledger.program/v1alpha1",    "programId": "string",    "externalKey": "string",    "title": "string",    "scope": {      "kind": "project",      "projectId": "string"    },    "origin": {      "sessionId": "string",      "graphId": "string",      "projectId": "string",      "phase": "string",      "stateVersion": 1    },    "createdByPrincipalRef": "string",    "author": {      "kind": "human",      "id": "string"    },    "createdAt": "2019-08-24T14:15:22Z"  },  "resumeCursor": {    "afterSeq": "string"  },  "lastEvent": {    "ledgerVersion": "rensei.session-ledger/v1alpha1",    "programVersion": "rensei.session-ledger.program/v1alpha1",    "programId": "string",    "eventId": "string",    "seq": "string",    "actor": {      "kind": "user",      "ref": "string"    },    "source": {      "kind": "session",      "ref": "string"    },    "projectId": "string",    "repositoryId": "string",    "waveId": "string",    "occurredAt": "2019-08-24T14:15:22Z",    "recordedAt": "2019-08-24T14:15:22Z",    "type": "issue_created",    "issue": {      "provider": "string",      "ref": "string"    }  },  "openWaves": [    {      "waveId": "string",      "openedEventId": "string",      "openedSeq": "string",      "openedAt": "2019-08-24T14:15:22Z"    }  ],  "inFlightChildren": [    {      "edgeId": "string",      "sessionId": "string",      "projectId": "string",      "transport": "string",      "edgeState": "string",      "phase": "string",      "stateVersion": 1,      "dispatchedEventId": "string",      "dispatchedSeq": "string",      "waveId": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "latestRecords": [    {      "ledgerVersion": "rensei.session-ledger/v1alpha1",      "programVersion": "rensei.session-ledger.program/v1alpha1",      "programId": "string",      "recordId": "string",      "kind": "decision",      "title": "string",      "body": "string",      "refs": {        "issues": [          "string"        ],        "commits": [          "string"        ],        "sessions": [          "string"        ]      },      "recipients": [        {          "kind": "session",          "id": "string"        }      ],      "replyToRecordId": "string",      "supersedesRecordId": "string",      "author": {        "kind": "human",        "id": "string"      },      "idempotencyKey": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "latestByKind": {    "decision": {      "ledgerVersion": "rensei.session-ledger/v1alpha1",      "programVersion": "rensei.session-ledger.program/v1alpha1",      "programId": "string",      "recordId": "string",      "kind": "decision",      "title": "string",      "body": "string",      "refs": {        "issues": [          "string"        ],        "commits": [          "string"        ],        "sessions": [          "string"        ]      },      "recipients": [        {          "kind": "session",          "id": "string"        }      ],      "replyToRecordId": "string",      "supersedesRecordId": "string",      "author": {        "kind": "human",        "id": "string"      },      "idempotencyKey": "string",      "createdAt": "2019-08-24T14:15:22Z"    },    "handoff": {      "ledgerVersion": "rensei.session-ledger/v1alpha1",      "programVersion": "rensei.session-ledger.program/v1alpha1",      "programId": "string",      "recordId": "string",      "kind": "decision",      "title": "string",      "body": "string",      "refs": {        "issues": [          "string"        ],        "commits": [          "string"        ],        "sessions": [          "string"        ]      },      "recipients": [        {          "kind": "session",          "id": "string"        }      ],      "replyToRecordId": "string",      "supersedesRecordId": "string",      "author": {        "kind": "human",        "id": "string"      },      "idempotencyKey": "string",      "createdAt": "2019-08-24T14:15:22Z"    },    "checkpoint": {      "ledgerVersion": "rensei.session-ledger/v1alpha1",      "programVersion": "rensei.session-ledger.program/v1alpha1",      "programId": "string",      "recordId": "string",      "kind": "decision",      "title": "string",      "body": "string",      "refs": {        "issues": [          "string"        ],        "commits": [          "string"        ],        "sessions": [          "string"        ]      },      "recipients": [        {          "kind": "session",          "id": "string"        }      ],      "replyToRecordId": "string",      "supersedesRecordId": "string",      "author": {        "kind": "human",        "id": "string"      },      "idempotencyKey": "string",      "createdAt": "2019-08-24T14:15:22Z"    },    "note": {      "ledgerVersion": "rensei.session-ledger/v1alpha1",      "programVersion": "rensei.session-ledger.program/v1alpha1",      "programId": "string",      "recordId": "string",      "kind": "decision",      "title": "string",      "body": "string",      "refs": {        "issues": [          "string"        ],        "commits": [          "string"        ],        "sessions": [          "string"        ]      },      "recipients": [        {          "kind": "session",          "id": "string"        }      ],      "replyToRecordId": "string",      "supersedesRecordId": "string",      "author": {        "kind": "human",        "id": "string"      },      "idempotencyKey": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "state": [    {      "ledgerVersion": "rensei.session-ledger/v1alpha1",      "programVersion": "rensei.session-ledger.program/v1alpha1",      "programId": "string",      "key": "string",      "version": 1,      "value": null,      "author": {        "kind": "human",        "id": "string"      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "stateTruncated": true,  "stateKeyCount": 0,  "mailbox": {    "readerSessionId": "string",    "unreadCount": 0,    "unreadAddressedCount": 0,    "newestUnreadRecordIds": [      "string"    ]  }}