---
title: "Result of one subprocess, reconstructed from its events"
method: GET
path: "/operations/{operationId}/subprocesses/{spid}"
tags: ["operation"]
---

# Result of one subprocess, reconstructed from its events

`GET /operations/{operationId}/subprocesses/{spid}`

Returns an `InstanceResult` for `spid` — the same shape as the
parent operation's `metadata.result` — folded from the
subprocess's event log (spawn / stdout / stderr / exit).
Works for running and terminal operations alike.  While the
process is still running, `state.exit_code` and `state.signal`
are `-1` (unknown) and `resources` holds sentinel defaults;
once the exit event lands they carry the real values.

`stdout` / `stderr` are consolidated and capped at the spec's
`truncate_output_at`.  The raw event stream stays available at
`GET /operations/{operationId}/events?spid={spid}`.

## Path parameters

- `operationId` string, uuid, required — A UUID string
- `spid` integer, required

## Response `200`

Result of the requested subprocess.

- InstanceResult — Result of an instance execution
  - `resources` object
    - `block_input` integer — Block input operations
    - `block_output` integer — Block output operations
    - `cost` number, float — Operation cost
    - `elapsed_time` number — Elapsed wall time
    - `involuntary_switches` integer — Number of involuntary context switches
    - `max_rss` integer — Maximum resident set size in KB
    - `monotonic_time` number, float — Monotonic time measurement
    - `page_faults` integer — Number of page faults
    - `page_faults_io` integer — Number of page faults requiring I/O
    - `shared_memory` integer — Shared memory size
    - `signals` integer — Number of signals received
    - `swaps` integer — Number of swaps
    - `system_cpu_time` number, float — System CPU time used
    - `unshared_memory` integer — Unshared memory size
    - `user_cpu_time` number, float — User CPU time used
    - `voluntary_switches` integer — Number of voluntary context switches
  - `state` object
    - `continued` boolean — Whether the process was continued from a stop
    - `core_dump` boolean — Whether a core dump was generated
    - `exit_code` integer — Process exit code
    - `pid` integer — Process ID
    - `signal` integer — Signal that caused termination, if any
    - `stopped` boolean — Whether the process was stopped
    - `timed_out` boolean — Whether process had been killed because operation timeout was reached
  - `stdout` StreamRepr
    - `value` string, required — Content of the stream
    - `encoding` 'ascii' | 'base64', required — Encoding of the content
    - `truncated` boolean — Whether the output was truncated
  - `stderr` StreamRepr
    - `value` string, required — Content of the stream
    - `encoding` 'ascii' | 'base64', required — Encoding of the content
    - `truncated` boolean — Whether the output was truncated

## Other responses

- `400` — Bad Request - Invalid request parameters
- `401` — Unauthorized - Invalid or missing authentication credentials. Either the `Authorization` bearer token is missing or invalid, or the `Project` header is missing.
- `403` — Forbidden - Token does not have sufficient permissions
- `404` — Not Found — the operation does not exist, its event log has no `spawn` event for that spid, or the operation was CANCELLED (events are dropped for cancelled operations).
- `425` — Too Early — the event source is not reachable yet (no worker holds the operation, or events.gz is not uploaded). Retry after `Retry-After`.

---

[API](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api.md) · [All operations](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nebius/nebius-openai-compatible-inference-api/revisions/0fb323abba3c/schema)
