POST /dynamic_search/saved_queries
Creates a query to be saved for use in dynamic searches. A query represents a request for data. Queries are not the same as searches, which are the results of a request for data. The benefit of saving a query is that it may be referenced in dynamic searches and can be reused.
Creates a query to be saved for use in dynamic searches. A query represents a request for data. Queries are not the same as searches, which are the results of a request for data. The benefit of saving a query is that it may be referenced in dynamic searches and can be reused.
MIME Type |
---|
application/json |
Parameter | Data Type | MIME Type | Description | Sample |
---|---|---|---|---|
query |
Object |
application/json |
The query to save. |
{ "name": "sampleQuery", "query": "Coming soon!" } |
HTTP Response Code | Unique Code | Description |
---|---|---|
201 |
The query object created by the request. |
|
409 |
5000 |
Caller has reached the maximum number of queries. |
422 |
5002 |
The query must have a valid name. |
422 |
1001 |
Error processing a supplied Field object (or one of its sub-objects). |
422 |
1002 |
Error processing a supplied Filter object (or one of its sub-objects) |
422 |
1003 |
Error processing a supplied Function object (or one of its sub-objects). |
422 |
1004 |
Error processing a supplied Operator object (or one of its sub-objects). |
422 |
1005 |
Error processing a supplied Range object (or one of its sub-objects). |
422 |
1006 |
Error processing a supplied Sort object (or one of its sub-objects). |
422 |
1007 |
Error combining elements of the Query object. |
Response Description
- id - String - A UUID to serve as a unique identifier for the query. This field is read-only.
- query - String - The JSON representation of the query. This field is required.
- name - String - A descriptive name for the query to make it easier to recall. This field is required.
- creation_time - Long - The time in milliseconds since epoch that this query was created. This field is read-only.
Response Sample
{
"creation_time": 42,
"id": "String",
"name": "String",
"query": {
"fields": [
{
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
}
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
}
}
},
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
}
],
"filters": [
{
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
}
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
}
}
}
],
"range": {
"limit": 42,
"offset": 42
},
"sorts": [
{
"direction": "String <one of: ASC, DESC>",
"field": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
}
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"left_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
],
"right_filter": {
"argument": {
"argument_fields": [
{
"contextual_type": "String",
"data_type": "String",
"localized_name": "String",
"semantic_type": "String"
}
],
"contextual_type": "String",
"data_type": "String",
"filter": "Object",
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
},
"operator": {
"connective": "String <one of: AND, OR, NOT>",
"data_type": "String",
"localized_name": "String",
"name": "String"
},
"parameters": [
"String"
]
}
}
},
"function": {
"aggregate": true,
"argument_types": [
{
"position": 42,
"type": "String"
}
],
"localized_name": "String",
"name": "String",
"return_data_type": "String"
},
"localized_name": "String",
"semantic_type": "String"
}
}
]
}
}