Gets the definition for a specific type of query including the available fields
curl -i -X GET \ 'https://system.api.756794052567.rhythmsoftware.com/queries/:tenantId/public/description/:queryType?contextId=string'
{- "id": "string",
- "name": "string",
- "description": "string",
- "primary_table": "string",
- "context": {
- "required": true,
- "service": "string",
- "field": "string",
- "display_name": "string",
- "help_text": "string"
}, - "perform_custom_resolution_logic": true,
- "common_table_expressions": [
- {
- "alias": "string",
- "sql": "string"
}
], - "services": [
- {
- "service": "string",
- "table": "string",
- "table_alias": "string",
- "group_name": "string",
- "id_column": "string",
- "join_fragment": "string",
- "hints": { }
}
], - "fields": [
- {
- "table_alias": "string",
- "database_column": "string",
- "custom_sql": "string",
- "group_name": "string",
- "name": "string",
- "label": "string",
- "type": "string",
- "reference_service": "string",
- "acceptable_values": [
- {
- "label": "string",
- "value": "string",
- "hide_from_portal": true
}
], - "service": "string"
}
], - "default_output_fields": [
- {
- "name": "string",
- "label": "string",
- "applies_when_context": "is given"
}
], - "default_sort_fields": [
- {
- "name": "string",
- "descending": true,
- "applies_when_context": "is given"
}
]
}
Starts a new query and returns the query id and info
The query
{- "context_id": "string",
- "criteria": { },
- "output_fields": [
- {
- "name": "string",
- "label": "string",
- "alias": "string"
}
], - "sort_fields": [
- {
- "name": "string",
- "descending": true
}
], - "limit": 0,
- "offset": 0,
- "name": "string"
}
{- "id": "string"
}
Gets the current status and results for a query that has previously been started
curl -i -X GET \ https://system.api.756794052567.rhythmsoftware.com/queries/:tenantId/describe/:id \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "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"
}