Import actions from an OpenAPI spec
If your API has an OpenAPI (Swagger) spec, Atlas reads it and drafts an action for each endpoint, with the URL, method, parameters and a description filled in. You pick which ones to keep. Use it when you want several endpoints available to your agent without filling in a form for each.
Import a spec
- Open the External Actions page. The sidebar doesn’t list it. Open it from the Open Global Actions link below the action list on an action step in a job’s workflow.
- On the Atlas Actions tab, select Create action, then Import from OpenAPI spec.
- Choose how to give Atlas the spec:
- Spec URL. Enter the address of your
openapi.jsonoropenapi.yaml, for examplehttps://api.example.com/openapi.json. Atlas fetches it, and waits up to 30 seconds. The address has to be reachable from the internet. - Paste JSON. Paste the spec into the OpenAPI JSON box. YAML works too.
- Spec URL. Enter the address of your
- Select Generate actions.
The spec needs an openapi or swagger field and at least one path. Generating takes longer for a large spec.
Pick what to import
Atlas shows a preview: “N actions generated from spec. Review and confirm to import.”
- Each row is one action, with its method, name, description and URL.
- Every row starts selected. Select a row to turn it off or on.
- Select all and Deselect all flip them together. A counter shows how many are selected, as “N of M selected”.
- Back returns to the spec box.
Select Import N actions. They appear on Connections, on the Actions tab, in the Custom group.
What Atlas writes for each endpoint
Atlas handles each path in the spec on its own. If it can’t draft an action for one path, it skips that path and the rest still come through.
After you import
- Read each description. Descriptions drawn from a spec often need a rewrite so the agent knows when to use the action. See Create a custom action.
- Set up sign-in. If an endpoint needs authentication, open the action. Under Authentication, pick a saved connection, or add a header yourself. See OAuth credentials.
- Put the actions on a job. See Put an action on a job.
Importing again adds new actions. It doesn’t change or replace the ones you already have. To avoid doubles, delete the old ones first.
Troubleshooting
If the form shows one of these messages, do the fix next to it.
If the list is shorter than you expect, check the spec for the missing endpoint. Atlas skipped that path.
If some actions fail to import, the window closes and keeps the ones that worked. Check the Actions tab under Connections for what’s missing. If every one fails, the window stays open and lists each with its reason.
