Querying the API

Version 23.0.9145


Querying the API


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

Connecting through Standard Drivers

Use the CData drivers for CData API Server to connect to your APIs as a remote database from business-intelligence (BI), analytics, ETL, and other SQL-based tools. You can also connect from native platforms such as .NET, Java, PHP, Objective-C, and so on.

See the API Driver help for more information.

Connecting through OData

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

In the CData Knowledge Base, you can find quick-start articles about these and other popular OData API consumers (for example, Salesforce Lightning Connect, SharePoint external lists, Microsoft Power BI, and Excel).

The following example query and response is 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" },
  ]
}

More Information

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 surface.

  • Actions: Extend the set of available operations. (API actions are analogous to stored procedures).