Discovery

Version 23.0.8844


Discovery

Version 23.0.8844


Based on the OpenAPI specification, the API Server’s APIs 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 the 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

The 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 key of the resource, and other information. You can access the complete metadata 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 resource, append $metadata to the resource URL of the resource, 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 the 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