Queries

Queries

Gets the definition for a specific type of query including the available fields

Gets the definition for a specific type of query including the available fields

Request
path Parameters
tenantId
required
string

Parameters to the query

queryType
required
string

The type of query

query Parameters
contextId
string

Optional query type

Responses
200The contact was merged successfully.
400The contact supplied was not valid.
401Unauthorized
403Forbidden
404The contact could not be found.
409The contact could not be saved because it refers to/depends on a non-existent object.
429Limit exceeded... unable to merge contact based on tenant limits.
500General server error.
get/queries/{tenantId}/public/description/{queryType}
Request samples
curl -i -X GET \
  'https://system.api.756794052567.rhythmsoftware.com/queries/:tenantId/public/description/:queryType?contextId=string'
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "primary_table": "string",
  • "context": {
    },
  • "perform_custom_resolution_logic": true,
  • "common_table_expressions": [
    ],
  • "services": [
    ],
  • "fields": [
    ],
  • "default_output_fields": [
    ],
  • "default_sort_fields": [
    ]
}

Starts a new query and returns the query id and info

Starts a new query and returns the query id and info

Request
Security:
path Parameters
tenantId
required
string

The current tenant

queryType
required
string

The type of query

outputFormat
required
string

The output format of the query

Request Body schema: application/json

The query

context_id
string (Context)
criteria
object (Criteria)
required
Array of objects non-empty
Array of objects
limit
number <float> (Limit)

The maximum number of rows to return

offset
number <float> (Offset)

The starting rows

name
string (Name)

Optional name of the query

Responses
200The query was started successfully.
400The query supplied was not valid.
401Unauthorized
403Forbidden
404The query definition could not be found.
429Limit exceeded... unable to merge contact based on tenant limits.
500General server error.
post/queries/{tenantId}/start/{queryType}/{outputFormat}
Request samples
application/json
{
  • "context_id": "string",
  • "criteria": { },
  • "output_fields": [
    ],
  • "sort_fields": [
    ],
  • "limit": 0,
  • "offset": 0,
  • "name": "string"
}
Response samples
application/json
{
  • "id": "string"
}

Gets the current status and results for a query that has previously been started

Gets the current status and results for a query that has previously been started

Request
Security:
path Parameters
tenantId
required
string

Parameters to the query

id
required
string

The ID of a previously started query

Responses
200The query details were located successfully.
400The query id supplied was not valid.
401Unauthorized
403Forbidden
404The query id could not be found.
409The contact could not be saved because it refers to/depends on a non-existent object.
429Limit exceeded... unable to merge contact based on tenant limits.
500General server error.
get/queries/{tenantId}/describe/{id}
Request samples
curl -i -X GET \
  https://system.api.756794052567.rhythmsoftware.com/queries/:tenantId/describe/:id \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "string",
  • "status": "string",
  • "duration": 0,
  • "has_result_set": true,
  • "rows": 0,
  • "size": 0,
  • "sys_created_at": "2019-08-24T14:15:22Z",
  • "sys_created_by_id": "string",
  • "sys_last_modified_at": "2019-08-24T14:15:22Z",
  • "sys_last_modified_by_id": "string",
  • "uri": "string",
  • "metadata_uri": "string",
  • "schedule_id": "string"
}