# UsageRunRow

One run behind a range's usage. Its usage is kept even after the run itself is deleted.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `processId` | `uuid` | The run's id. |
| `type` | [`ProcessType`](https://docs.maitento.com/reference/types/process-type.md) | The kind of run. |
| `definitionId` | `uuid` | The id of the definition the run was started from. |
| `definitionName` | `string \| null` | The definition's name when the run used it. |
| `definitionVersion` | `integer` | The definition's version the run used. |
| `namespaceId` | `uuid \| null` | The id of the definition's namespace. |
| `namespaceName` | `string \| null` | The namespace's name when the run used it. |
| `outcome` | [`UsageOutcome`](https://docs.maitento.com/reference/types/usage-outcome.md) | How the run ended, or `InProgress`. |
| `dateStarted` | `datetime \| null` | When the run started, in UTC. |
| `dateEnded` | `datetime \| null` | When the run ended, in UTC; null while it is in progress. |
| `date` | `datetime` | The date the run is listed by: its end or, while it is in progress, its latest usage. |
| `runtimeMs` | `integer \| null` | Wall-clock time, start to end, in milliseconds; null while in progress. |
| `executionMs` | `integer \| null` | The time the run was actually executing, in milliseconds; null while in progress. |
| `tokens` | [`UsageTokenTotals`](https://docs.maitento.com/reference/types/usage-token-totals.md) | The run's tokens that match the request's agent, provider, model, engine, credential kind and tier filters (all of them when there are none). |
| `totalTokens` | [`UsageTokenTotals`](https://docs.maitento.com/reference/types/usage-token-totals.md) | All of the run's tokens. |
| `steps` | `integer` | The code pipeline steps the run ran; 0 for other kinds of run. |
| `toolCalls` | `integer` | The code pipeline's tool uses; 0 for other kinds of run. |
| `startedBy` | [`UsageStartedBy`](https://docs.maitento.com/reference/types/usage-started-by.md) | What started the run. |
| `triggerId` | `uuid \| null` | The id of the user or automation that started the run; null when another run started it. |
| `triggerName` | `string \| null` | The user's or automation's name, when it can still be found. |
| `parentProcessId` | `uuid \| null` | The id of the run that started this one, or null. |
| `parentProcessType` | [`ProcessType`](https://docs.maitento.com/reference/types/process-type.md)`\| null` | The kind of run `parentProcessId` is. |
| `rootProcessId` | `uuid \| null` | The id of the run at the top of this run's tree. |
| `rootType` | [`ProcessType`](https://docs.maitento.com/reference/types/process-type.md)`\| null` | The kind of run at the top of the tree. |
| `rootDefinitionId` | `uuid \| null` | The definition id of the run at the top of the tree. |
| `rootDefinitionName` | `string \| null` | The definition name of the run at the top of the tree. |
| `available` | `boolean` | Whether the run still exists, so it can be read. False once retention has deleted it. A run a retention lease keeps is never deleted, so it is always available. |
| `status` | `string \| null` | The run's current status (its kind's own status name); null once it is deleted. |
| `state` | [`ProcessState`](https://docs.maitento.com/reference/types/process-state.md)`\| null` | Which group `status` falls into; null once the run is deleted. |
| `retentionLease` | [`ProcessRetentionLease`](https://docs.maitento.com/reference/types/process-retention-lease.md)`\| null` | The retention lease that keeps the run (its own, or one inherited from a retained run that started it), or null. |
| `retentionExpiresAtUtc` | `datetime \| null` | When the run will be deleted, in UTC. Null while it is retained, while it has not ended, or once it is deleted. |

## Example

```json
{
  "processId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "type": "App",
  "definitionId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "definitionName": "...",
  "definitionVersion": 0,
  "namespaceId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "namespaceName": "...",
  "outcome": "InProgress",
  "dateStarted": "2026-10-26T12:00:00.0000000Z",
  "dateEnded": "2026-10-26T12:00:00.0000000Z",
  "date": "2026-10-26T12:00:00.0000000Z",
  "runtimeMs": 0,
  "executionMs": 0,
  "tokens": {
    "input": 0,
    "output": 0,
    "cacheRead": 0,
    "cacheWrite": 0,
    "reasoning": 0,
    "total": 0
  },
  "totalTokens": {
    "input": 0,
    "output": 0,
    "cacheRead": 0,
    "cacheWrite": 0,
    "reasoning": 0,
    "total": 0
  },
  "steps": 0,
  "toolCalls": 0,
  "startedBy": "User",
  "triggerId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "triggerName": "...",
  "parentProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "parentProcessType": "App",
  "rootProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "rootType": "App",
  "rootDefinitionId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "rootDefinitionName": "...",
  "available": false,
  "status": "...",
  "state": "Active",
  "retentionLease": {
    "appliedAtUtc": "2026-10-26T12:00:00.0000000Z",
    "appliedByUserId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
    "appliedByUserName": "...",
    "note": "...",
    "inheritedFromProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
    "inheritedFromProcessType": "App"
  },
  "retentionExpiresAtUtc": "2026-10-26T12:00:00.0000000Z"
}
```

## Where it's used

- Inside [`UsageRunPage`](https://docs.maitento.com/reference/types/usage-run-page.md)
