# uip maestro flow extraction

> Syntax and options for `uip maestro flow extraction check`, which reports whether the signed-in tenant can run the Extract document node of a Flow.

`uip maestro flow extraction check` reports whether document extraction is usable on the signed-in tenant. Run it before adding an Extract document node (`uipath.ixp.extract-document-builder`) to a flow.

The Extract document node is not part of the tenant's node catalog, so [`uip maestro flow registry`](./uip-maestro-flow-registry.md) and `uip maestro flow compile` do not report whether the tenant can run it. A flow with the node validates and packs on a tenant that cannot run it, and the run then faults.

## Synopsis

```
uip maestro flow extraction check [--login-validity <minutes>]
```

Requires `uip login`. Honors [global options](./global-options.md). Exit codes follow the [standard contract](./exit-codes.md).

## Options

| Option | Default | Description |
|---|---|---|
| `--login-validity <minutes>` | `10` | Minimum minutes before token expiration to trigger an automatic refresh. |

## Behavior

- The command reads two tenant services and writes nothing.
- The verdict is a successful answer. The command exits `0` and returns `Available: false` when the tenant cannot use document extraction.
- The command fails only when there is no valid login (exit code `2`, `ErrorCode: authentication_required`) or when a service does not answer.

## Example

```bash
uip maestro flow extraction check
```

## Data shape (--output json)

```json
{
  "Code": "ExtractionCheckSuccess",
  "Data": {
    "Available": true,
    "Status": "Available",
    "Reason": "Document extraction is available on this tenant.",
    "Tenant": "Finance"
  }
}
```

| Field | Description |
|---|---|
| `Available` | `true` only when `Status` is `Available`. |
| `Status` | One of the values in the next table. |
| `Reason` | One sentence that says what the status means for this tenant. |
| `Tenant` | The name of the tenant that was checked. |

`Status` values:

| Status | Meaning |
|---|---|
| `Available` | The node can be added and runs on this tenant. |
| `FeatureDisabled` | Document extraction is turned off for this tenant. An administrator has to turn it on. |
| `ServiceUnavailable` | This environment does not serve document extraction. |
| `ModelUnavailable` | Document extraction is turned on, but the tenant has no model to extract with. |
| `Unknown` | A service answered, but the answer does not show whether the node can run. |

`Instructions` says what to do for the returned status.

## See also

- [`uip maestro flow nodes create`](./uip-maestro-flow-node-edge.md#extract-document-nodes) — add an Extract document node
- [`uip maestro flow nodes schema`](./uip-maestro-flow-node-edge.md#uip-maestro-flow-nodes-schema-set) — read and replace the extraction schema of the node
- [`uip maestro flow validate`](./uip-maestro-flow-validate.md)
- [Flow overview](./uip-maestro-flow.md)
