Query

The Query Service acts as an intermediary between external systems and the Clearingworks Business Intelligence (BI) system. It allows for retrieving information through APIs without modifying the existing API structure. New queries can be added by configuring the BI system, eliminating the need for code changes. The service provides functionality to list available queries, get the metadata for the query (including parameters and results), and to execute the queries.

Run Query

Run a query for the given criteria.

SecurityJWT
Request
path Parameters
searchPath
required
string
Request Body schema:
required
Array of objects (ParameterValue)

List of Parameters defining the criteria for an operation

Responses
200

Success

500

Internal Server Error

post/cw/query/runQuery/{searchPath}
Request samples
{
  • "parameterList": [
    ]
}
Response samples
{
  • "queryPath": "Business Units",
  • "parameterDefs": [
    ],
  • "rowType": "APITransaction",
  • "populatedFields": [
    ],
  • "sortableFields": [
    ]
}

List Queries

Get a list of available queries

SecurityJWT
Responses
200

Success

500

Internal Server Error

get/cw/query/listQueries
Request samples
Response samples
{
  • "rows": [
    ],
  • "totalCount": 0
}

Get Query Metadata

Retrieve the available query parameters and row type for a query.

SecurityJWT
Request
path Parameters
searchPath
required
string
query Parameters
merchantId
required
string
Responses
200

Success

404

Not found

500

Internal Server Error

get/cw/query/getQueryMetadata/{searchPath}
Request samples
Response samples
{
  • "queryPath": "Business Units",
  • "parameterDefs": [
    ],
  • "rowType": "APITransaction",
  • "populatedFields": [
    ],
  • "sortableFields": [
    ]
}