Skip to content
Get started

Retrieve OpenAPI definition

client.openAPI.retrieve(RequestOptionsoptions?): OpenAPIRetrieveResponse
GET/openapi

Retrieve the current OpenAPI format (YAML) definition for this API. This is useful for documentation tools, mocking, testing and client generation.

ReturnsExpand Collapse
OpenAPIRetrieveResponse = unknown

Retrieve OpenAPI definition

import Ocm from 'ocm-sdk';

const client = new Ocm({
  apiKey: process.env['OCM_API_KEY'], // This is the default and can be omitted
});

const openAPI = await client.openAPI.retrieve();

console.log(openAPI);
Returns Examples