Discovery

Version 25.3.9411


Discovery


API Server’s APIs are based on the OpenAPI specification, and are fully documented and discoverable. The APIs can be accessed from standard JavaScript, applications compliant with OpenAPI, or any application that supports the OData standard. The following sections show how to use these standards to discover the APIs.

Service Document

The service document is a simple listing of all the APIs in JSON format by default. The service document is returned from the service root, where all requests are made, including metadata discovery requests. The following is an example of the service root:

http://MyServer:MyPort/api.rsc/

To retrieve more detailed information, make a request to the metadata URL.

Metadata URL

API Server exposes the capabilities of its APIs to OData consumers through the OData metadata document URL. The metadata document is returned as XML and contains column data types, the table key column, and other information. You can access the complete metadata table resource by appending $metadata to the service root, as shown in the following example:

http://MyServer:MyPort/api.rsc/$metadata

To access the metadata for a table, append $metadata to the table URL, as shown in the following example:

http://MyServer:MyPort/api.rsc/Cars/$metadata

OpenAPI Definition

OpenAPI (Swagger) definitions are generated for the data sources you surface through API Server.

To obtain the Swagger definition, append $swagger to the service root, as shown in the following example:

http://MyServer:MyPort/api.rsc/$swagger