REST API reference: OpenAPI and Postman
Download the OpenAPI 3.1 description of this API or its Postman collection, import either into your API client and generate typed code from the OpenAPI document.
Two public files
The OpenAPI document is at https://optisway.com/api/v1/openapi.json and the Postman collection at https://optisway.com/api/v1/postman.json. Both answer without an API key, may be cached for an hour and carry an ETag: send it back in If-None-Match and an unchanged file answers 304.
Both files are generated from the same data as this reference, so they describe every endpoint, parameter, object and error code on these pages with the same examples. Because v1 changes only by adding, regenerate or re-import them when the changelog on the Versioning page lists something new.
Import into Postman
In Postman, choose Import, paste https://optisway.com/api/v1/postman.json and confirm. The collection has one folder per resource, and every request carries its documented example response.
The collection sends Authorization: Bearer {{OPTISWAY_API_KEY}} with every request and keeps the base URL in {{baseUrl}}. Enter your key as the current value of OPTISWAY_API_KEY or in an environment, never as its initial value, which is shared together with the collection.
Import into Insomnia
In Insomnia, choose Import, select URL and paste https://optisway.com/api/v1/openapi.json. Insomnia reads the OpenAPI document and creates a request for every operation, grouped by its tag.
Every operation requires the Bearer scheme bearer, so the imported requests use Bearer authentication. Store your key in an environment variable and use it as the token instead of pasting it into each request.
Import into Bruno
Bruno imports files: download openapi.json with the link or the curl command below, then use Import Collection in Bruno and pick the file. Bruno imports both OpenAPI 3 documents and Postman collections, so postman.json works as well.
Bruno keeps the collection as plain files in a folder you choose, so you can commit it next to your code. Keep the key out of that folder: put it in a Bruno environment variable and mark the variable as secret.
Generate a client
Optisway publishes no SDKs of its own; generate a typed client from the OpenAPI document instead. Community tools read any OpenAPI 3.1 file, for example OpenAPI Generator for many languages or openapi-typescript for TypeScript types.
Generate from a saved copy of openapi.json, review the generated code like your own and commit it. Every operation has a stable operationId, such as startRun, so generated method names stay the same between versions. Each operation also states the access level its key needs in the vendor extension x-optisway-access: read, run or manage.
Download
- openapi.jsonOpenAPI 3.1 document for API clients and code generators.
- postman.jsonPostman collection v2.1 with an example request for every endpoint.
curl -fsS -o openapi.json https://optisway.com/api/v1/openapi.json
curl -fsS -o postman.json https://optisway.com/api/v1/postman.jsonWhat is inside
- 15 operations on 12 paths, each with its parameters, its example response and its error responses.
- 22 schemas, among them
Project,Test,Run, the pagedRunPageand theErrorenvelope. - 11 error codes with their status, their headers and an example body.
- Bearer authentication on every operation, as the security scheme
bearer. - In the collection: 4 folders and 15 requests, each with its saved example response.