> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Run the OpenAPI/REST Connector Externally

> Learn how to configure OpenMetadata REST API connectors using YAML. Complete documentation with examples, parameters, and best practices for seamless integration.

![REST](https://docs.open-metadata.org/public/images/connectors/rest.webp)

# REST

BETA

In this section, we provide guides and references to use the OpenAPI/REST connector.
Configure and schedule REST metadata workflows from the OpenMetadata UI:

* [Requirements](#requirements)
* [Metadata Ingestion](#metadata-ingestion)

## How to Run the Connector Externally

To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with
custom Airflow plugins to handle the workflow deployment.

If, instead, you want to manage your workflows externally on your preferred orchestrator, you can check
the following docs to run the Ingestion Framework **anywhere**.

> [card] [External Schedulers](https://docs.open-metadata.org/v2.1.x/deployment/ingestion.md)
>
> Get more information about running the Ingestion Framework Externally

## Requirements

### Python Requirements

Use Python 3.10 or later. Python 3.12 is recommended, because it is what the OpenMetadata 2.0 ingestion images use. To confirm the supported range for your release, check the `Requires-Python` metadata of that release’s `openmetadata-ingestion` package.

### Generate OpenAPI Schema URL

* Generate OpenAPI schema URL for your service[OpenAPI spec](https://swagger.io/specification/#openapi-document)

## Metadata Ingestion

### 1. Define the YAML Config

This is a sample config for OpenAPI:

#### Source Configuration

Configure the source type and service name for your REST API connector.

#### Connection Type

**type**: Set to `Rest` for REST API connections.

#### OpenAPI Schema URL

**openAPISchemaURL**: An OpenAPI schema URL typically refers to the URL where the OpenAPI Specification (OAS) document of a web service is hosted. The document defines the service's API, including available endpoints, request/response formats, authentication methods, etc. It is usually in JSON format. for e.g. `https://petstore3.swagger.io/api/v3/openapi.json`

**Token**: An authentication token to connect to an OpenAPI schema URL. It is only required if the API schema is protected or secured.

rest\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: rest
  serviceName: openapi_rest
  serviceConnection:
    config:
      type: Rest
      openAPISchemaURL: https://docs.open-metadata.org/swagger.json
```

```yaml theme={null}
  sourceConfig:
    config:
      type: ApiMetadata
      markDeletedApiCollections: true
      overrideMetadata: false
      # apiCollectionFilterPattern:
      #   includes:
      #     - apiCollection1
      #     - apiCollection2
      #   excludes:
      #     - apiCollection3
      #     - apiCollection4
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:

```bash theme={null}
metadata ingest -c <path-to-yaml>
```

Note that from connector to connector, this recipe will always be the same. By updating the YAML configuration,
you will be able to extract metadata from different sources.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.