Project Operations: Import API Definitions
Import an OpenAPI, WSDL, or GraphQL definition into your project by file upload or URL, with Auto-Detect, then confirm the endpoints that were discovered.
Overview
After creating a project, the next step is importing your API definition. This is what builds the endpoint inventory that everything else — test generation, execution, reporting — is based on.
You can import from a local file or from a hosted URL, and Shift-Left API can detect the format for you.
What you can import
Shift-Left API imports all three supported protocols:
| Protocol | Format | File types |
|---|---|---|
| REST | OpenAPI 3.x or Swagger 2.0 | .json, .yaml, .yml |
| SOAP | WSDL | .wsdl, .xml |
| GraphQL | GraphQL schema | .graphql, .gql |
The importer offers Auto-Detect, which inspects the document and picks the right parser. You can also set the type explicitly — REST, SOAP, or GraphQL — if detection gets it wrong or you'd rather be certain.
Before you begin
- The project must already exist. See Project.
- For URL import, the specification must be reachable over HTTP/HTTPS from wherever the import runs.
- Have the spec validated on your side first. The importer parses the document as-is; an invalid spec produces a partial or failed import rather than a fixed one.
Method A — upload a file
Use this when the specification is on your machine.
- In the import dialog, select the Upload File tab.
- Provide the file by dragging it onto the drop area, or by browsing for it.
- Leave the type on Auto-Detect, or set it explicitly.
- Start the import.
Method B — import from a URL
Use this when the specification is hosted — for example, a Swagger endpoint your service already exposes.
- Select the Import from URL tab.
- Enter the full specification URL, such as
https://api.example.com/swagger.json. - Start the import.
URL import is usually the better choice for a spec your service publishes, because re-importing later picks up whatever the service is currently serving rather than a file that may have gone stale on someone's laptop.
Confirm what was discovered
When the import finishes, the discovered endpoints are shown. Before moving on:
- Check the endpoint count against what you expect from the spec.
- Confirm the critical paths and methods are present.
- Check that endpoints landed under sensible features — features come from the tags or groups in your specification, so a spec with no tags produces a flatter structure.
If endpoints are missing, the gap is almost always in the source document rather than the import. Check that the operations are actually defined in the spec you supplied, and that you imported the version you meant to.
Importing test scripts
The import dialog also offers Import test scripts as tests. When your source document carries test scripts, this brings them in as tests rather than discarding them, so you don't start from an empty test suite.
Re-importing when the spec changes
Importing again against an updated spec is the normal way to keep a project aligned with a moving API. To see what changed rather than just absorbing it silently, use change detection — it reports added, modified, and removed operations so you can review the impact on existing tests. See API change detection and enable it in Project settings.
Troubleshooting
- "Failed to parse OpenAPI" — the document isn't valid OpenAPI/Swagger, or it's a different format than the parser expected. Validate the spec, or set the type explicitly instead of using Auto-Detect.
- "Failed to import WSDL" — the WSDL couldn't be parsed. Check that imported/included schema files it references are reachable, not just the top-level document.
- "Error importing from URL" — the URL couldn't be fetched. Check that it's reachable, returns the raw spec rather than an HTML documentation page, and doesn't require authentication the importer doesn't have.
- "Please enter a URL to import" / "Please select a file to import" — the import was started with an empty tab. Provide the source first.
- "Error reading file" / "Error processing file" — the file couldn't be read or parsed. Confirm the extension matches the actual contents.
- Import succeeds but the endpoint count is far lower than expected — you likely imported a partial or filtered spec. Compare the operation count in the source document.
Next in the workflow
- Configure environments and authentication — Project settings
- Browse the imported tree — Managing projects
- Check endpoints resolve — Validate endpoints
- Generate tests — AI-generated tests
Related articles
Previous
Create Your First Project in Shift-Left API
Product documentation
Next
Managing Projects and Endpoints
Product documentation
Related articles
- Create Your First Project in Shift-Left API · Product documentation
- Managing Projects and Endpoints · Product documentation
- Project Settings: Environments and Auth · Product documentation
Next steps
- Getting started · Install + connect your spec
- Configuration fundamentals · Stabilize runs
- Initial configuration · Users, licensing, projects
- Release notes · Updates and fixes
Still stuck?
Tell us what you’re trying to accomplish and we’ll point you to the right setup—installation, auth, or CI/CD wiring.