Querying the API

Version 23.0.8844


Querying the API

Version 23.0.8844


You can connect to the standard REST APIs from widely supported tools or interact with the JSON APIs through plain JavaScript.

Connect through Standard Drivers

Use the CData Drivers for the API Server to connect to your APIs as a remote database from BI, analytics, ETL, and other SQL-based tools, as well as native .NET, Java, PHP, Objective-C, etc.

Refer to the CData Driver for API Server documentation for more information.

Connect through OData

The OData protocol is widely supported by developer tools and there are dozens of client libraries available for working with OData from .NET, Java, PHP, Objective-C, etc. Based on OpenAPI, the APIs are fully documented and discoverable. See Discovery to provide the metadata URLs to apps, documentation generators, client-side libraries, etc.

In the CData KB, you can find quickstarts to these and other popular OData API consumers, such as Salesforce Lightning Connect, SharePoint external lists, Microsoft Power BI, and Excel.

Connect through JSON

Below is an example query and response in JSON-formatted OData, the default format.

Request

http://localhost:8153/api.rsc/Cars

Response

{
  "@odata.context":"http://MyServer:MyPort/api.rsc/$metadata#Cars",
  "value":[
    { "Id": "10001", "Model": "MyModel1", "Color": "MyColor1" },
    { "Id": "10002", "Model2": "MyModel2", "Color2": "MyColor2" },
  ]
}

See Also

See the following sections to get started working with the APIs:

  • Configuring the API: Configure authentication and access control.
  • Resources: Execute create, read, update, and delete (CRUD) operations to the tables you surfaced.
  • Actions: Extend the set of available operations (API actions are analogous to stored procedures).