For the complete documentation index, see llms.txt. This page is also available as Markdown.

CDA API

CDA API Reference ..

Understanding the API allows you to leverage CDA (Community Data Access) to integrate data with external applications. This capability is particularly valuable when you're not using CDE (Community Dashboard Editor) or CDF (Community Dashboard Framework) for dashboard development.

The API integration with CTools provides enhanced functionality through CDA's Web API interface. To make requests, use this base URL structure:

$BASE_URL/$WEBAPP/plugin/cda/api/

Where:

$BASE_URL represents the protocol, hostname, and port

$WEBAPP is the Apache Tomcat web application name (default is 'pentaho')

Here's a sample URL demonstrating a query to the pentaho webapp:


APIs

The getCdaList endpoint will get a list of all the CDA files available inside the repository. There is no need to specify the parameters for this endpoint.

To retrieve all available queries from a CDA file, use the listQueries endpoint.

Parameters:

path (required): Specifies the location of the CDA file to analyze

outputType (optional): Sets the response format

• Default: json

• Alternative: xml

This endpoint retrieves all parameters defined within a specified query.

Required Parameters:

path: The location of the CDA file containing the query definitions

dataAccessId: The identifier of the specific query to examine

Optional Parameters:

outputType: The desired format for the response

• Default: json

• Alternative: xml

The method executes a query and returns its results. It requires two mandatory parameters:

path: Specifies which file contains both:

• The connection settings

• The query to be executed

dataAccessId: Identifies which data access definition from the CDA file should be used. This definition links to a connection that was previously configured (as covered in the previous chapter).

When using parameters in your query, include them in the URL as paramParameter, where "Parameter" is replaced with the actual parameter name.

Optional Parameters:

outputType: Controls the format of the returned results

• Default: json

• Other formats: xml, csv, xls, html

Query Pagination and Parameters in CDA

Basic Pagination

To implement pagination in your queries, use these parameters:

paginateQuery (Boolean): Enable/disable pagination

pageStart: Starting row number

pageSize: Number of rows per page

Additional Query Parameters

bypassCache (Boolean): When set to true, forces a fresh database request instead of using cached data

sortBy: Specify column(s) for sorting results

This method will open the CDA editor for a particular query. We should define a parameter with the path to the CDA file. The parameter is path.

Edit CDA

Was this helpful?