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

# OpenAPI Import

> Automatically generate REST connectors from OpenAPI specifications.

Import an OpenAPI/Swagger specification to auto-generate REST connector with all operations and schemas.

## How to Import

<Steps>
  <Step title="Start Import">
    1. **Connectors** > **Create Connector**
    2. Choose **REST API**
    3. Click **Import from OpenAPI**
  </Step>

  <Step title="Provide Specification">
    Choose one:

    * **URL** - Provide OpenAPI spec URL
    * **File** - Upload JSON/YAML spec file
    * **Paste** - Paste spec content directly
  </Step>

  <Step title="Configure">
    * Review base URL
    * Select operations to include (or include all)
    * Verify authentication detection
  </Step>

  <Step title="Generate">
    Click **Generate Connector**. All operations auto-mapped.
  </Step>

  <Step title="Review and Test">
    1. Review generated operations
    2. Edit if needed
    3. Test each operation
    4. Save connector
  </Step>
</Steps>

## What Gets Imported

From your OpenAPI spec:

* ✓ Base URL
* ✓ All endpoints as operations
* ✓ Parameter definitions (path, query, body)
* ✓ Request/response schemas
* ✓ Authentication schemes
* ✓ Operation descriptions
* ✓ Content types

## Supported Formats

* **OpenAPI 3.0+** (latest recommended)
* **Swagger 2.0** (legacy)
* **JSON or YAML** format
* **Local files or URLs**

## Public API Specs

Many services publish OpenAPI specs:

| Service  | Spec URL                                                                                                                                                   |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GitHub   | [https://docs.github.com/en/rest/overview/api-versions?apiVersion=2022-11-28](https://docs.github.com/en/rest/overview/api-versions?apiVersion=2022-11-28) |
| Stripe   | [https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json](https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json)   |
| Petstore | [https://petstore.swagger.io/v2/swagger.json](https://petstore.swagger.io/v2/swagger.json)                                                                 |

Find more at [OpenAPI Directory](https://apis.guru/).

## Import Example

Import Petstore API:

1. Connectors > Create > REST API > Import from OpenAPI
2. Paste: `https://petstore.swagger.io/v2/swagger.json`
3. Review operations (GET /pets, POST /pets, etc.)
4. Configure authentication if needed
5. Test operations
6. Save

Connector now has all Petstore operations ready to use.

## Editing After Import

Auto-generated connectors can be edited:

1. Open connector
2. Click **Edit**
3. Modify operations, add new ones, remove unused
4. Update authentication
5. Test changes
6. Save

## Authentication Mapping

OpenAPI specs may include auth schemes. Verify import detected them:

1. Open connector
2. Click **Authentication**
3. Check detected auth method
4. Provide credentials if needed

Common schemes:

* **Bearer Token** - API key in Authorization header
* **OAuth 2.0** - OAuth2 flow
* **API Key** - Custom header or query param

## Partial Imports

Don't need all operations? Select subset:

1. During import, under "Select Operations"
2. Uncheck operations you don't need
3. Click **Generate**

Only selected operations included.

## Common Issues

### "Invalid OpenAPI Spec"

* Ensure JSON/YAML is valid
* Check OpenAPI version compatibility
* Verify all required fields present

### "Authentication Not Detected"

* Manually configure in **Authentication** tab
* Check spec has security schemes defined
* Update credentials

### "Operations Missing Parameters"

* Verify spec has full parameter definitions
* Some specs may be incomplete
* Edit operations to add missing params

## Best Practices

### Start Simple

Import just operations you need. Reduce complexity.

### Test After Import

Test each operation before attaching to agents/gateways.

### Document Changes

If you edit auto-generated connector, note changes.

### Keep Sync

If API updates its spec, re-import and update connector.

## API-Specific Notes

### GitHub

* Base URL auto-detected
* Requires personal access token
* Provides comprehensive API

### Stripe

* Extensive OpenAPI spec
* Uses Bearer auth
* Includes most endpoints

### Cloud APIs

* Extremely large specs
* Consider importing partial APIs
* May need custom configuration

## Cost

For current pricing details, see [Pricing](https://noorle.com/pricing/).

No extra cost to import. Costs are same as REST operations.

## Next Steps

* [REST Connectors](/docs/run/connectors/rest-connectors)
* [Authentication](/docs/run/connectors/authentication)
* [Attach to Agent](/docs/run/agents/attaching-capabilities)
