Read one run - Spacefast Docs
Read one run
Returns one run: its result, the problem document that explains a failure, or the approval it is parked on.
GET /v1/connectors/runs/{runId}
Authorization
Authorization Bearer token · header required
Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).
or
Authorization OAuth2 access token · header required
OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.
Scopes: connectors:read
Path parameters
runId string required
- min length 1
Query parameters
team string
- min length 1 · max length 255
Responses
200 Response for status 200
$schema string
Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
data object required
One execution. A tool call and a code program are the same resource.
Show properties
- object
idstring required- Run id (
cxr_).
- Run id (
inputobject required- What the run was asked to do, without echoing arguments that may carry customer data.
Show properties
kindstring requiredtoolis one call;codeis a program that may make many. Same endpoint, same id space, same resume.
- Allowed:
tool,code addressstring | any required- Tool address for a
toolrun; null for acodeprogram.
- Tool address for a
Show properties
- Any of:
- string
- Any of:
digeststring required- Content digest of the submitted input, so a retry can be recognized without replaying it.
usageobject required- What this run has spent. Budgets are enforced against these numbers.
Show properties
toolCallsinteger required- Tool calls made so far.
- min -9007199254740991 · max 9007199254740991
egressBytesinteger required- Bytes read from third-party APIs so far.
- min -9007199254740991 · max 9007199254740991
durationMsinteger required- Wall-clock time spent executing so far.
- min -9007199254740991 · max 9007199254740991
createdAtstringrequired - matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
statusstring required- Still executing. Poll the run, or submit the next one with a longer
waitMs.
- Still executing. Poll the run, or submit the next one with a longer
Try it
Server
Base URL https://api.spacefast.com
Authorization
Bearer token
Parameters
runId path * team query
Send
Request
curl -X GET "https://api.spacefast.com/v1/connectors/runs/string" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
200 default
{
"$schema": "http://example.com",
"data": {
"id": "string",
"input": {
"kind": "tool",
"address": "string",
"digest": "string"
},
"usage": {
"toolCalls": -9007199254740991,
"egressBytes": -9007199254740991,
"durationMs": -9007199254740991
},
"createdAt": "2019-08-24T14:15:22Z",
"status": "running"
}
}
{
"$schema": "http://example.com",
"type": "string",
"title": "string",
"status": -9007199254740991,
"detail": "string",
"code": "string",
"pointer": "string",
"details": {
"property1": null,
"property2": null
},
"suggestions": [
"string"
],
"next": [
"string"
],
"requestId": "string"
}