# OpenAPI

Source: https://openflow.run/en/docs/nodes/openapi/
Language: en
Product version: 0.1.0-beta.77

Derive request and response ports from a selected API document operation.

Use OpenAPI when an API publishes a document that describes the operation you want to call. The product resolves operation ports and authentication choices from that document.

## Select an operation

```json
{
  "op": "node.add", "as": "status", "type": "openapi", "name": "Read service status",
  "config": {
    "sourceUrl": "https://api.example.com/openapi.json",
    "path": "/status",
    "method": "get"
  }
}
```

Replace the example document URL with the real API document. Select its path and method, then inspect the generated fields and available authentication choices. Bind advertised credentials through inputs.

OpenAPI derives its request and result ports from the selected GET /status operation.

**Input**
The included example OpenAPI document declares a status response.

**Expected result**
The selected operation returns its declared response through generated ports.

**Before running**
Use a real API document and endpoint, then select the operation and required authentication.

[Download workflow](https://openflow.run/docs/examples/openapi-status.openflow.json)

## Generated ports

The selected operation defines parameters, body shape, and result ports. Read node details for those exact names rather than carrying assumptions from another API operation.

The node keeps a saved definition snapshot. Ordinary local edits preserve it; refresh or reselect the operation explicitly to adopt a changed document. A document update should not silently change unrelated node configuration.

## Authentication

Authentication is selected from the resolved choices and replaced as one complete choice. Bind the credentials supported by that selection. An API document describes how to authenticate; it does not supply permission to use the API.

## Choosing another node

Use [HTTP Request](https://openflow.run/en/docs/nodes/http-request/index.md) for an endpoint without an OpenAPI document. Use [Connector](https://openflow.run/en/docs/nodes/connector/index.md) for an existing catalog Action with managed account authorization.

OpenAPI supports ordinary [retries and handled errors](https://openflow.run/en/docs/concepts/errors-and-retries/index.md). A repeated request may repeat a remote side effect.

## Sources

*   [docs/control/contracts/control-api.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/control/contracts/control-api.md#openapi-documents-and-tasks)
*   [docs/authoring/node-authoring.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/authoring/node-authoring.md)
*   [packages/open-flow/src/workbench/browser/runtime/editor/addNodeOptions.ts](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/packages/open-flow/src/workbench/browser/runtime/editor/addNodeOptions.ts)
