Excerpt |
---|
Public Search for publicly available content search |
...
Endpoint ID: | 9005 |
Method: | Image Modified |
URL: |
POST datacontenttagged/search |
Request body: |
JSON data with information about the content to be searchedA JSON object describing the search parameters.
|
compareValue1 | compare: | | tags | An array of tags | Optional fields: | |
|
| compareValue2: | |
Optional fields: |
| tags | |
| fromDate | Optional date value defining content active start date. The date must be in UTC, for example "2014-01-01T01:00Z". |
| limit: | |
| offset: | |
limit | The maximum number of content to return. If omitted, limit is set to 1. | | offset | The offset in search results from where to return data. If omitted, offset is set to 0. | | fromDate | UTC date used to filter search results by the content activeFrom date if it exists, or otherwise the created date. | | toDate | UTC date used to filter search results by the content activeTo date. Content with no activeTo date will always be included. | | data | An array of data filters. All filters are applied, so the example below could be read as "data with key 'a' greater than 5.1, where data with key 'width' is not equal to '250px'" key | The data key that is to be matched | compare | The comparison operator. Possible compare options are:= != < > <= >= empty notempty | compareValue | String or decimal comparison value. Required for all comparison operators except empty and notempty . Note |
---|
String data values will only be compared with string filter values, and numeric data values will only be compared with numeric filter values. So ensure that numeric values are entered as numbers, i.e. 5.9 not "5.9" . Numeric values are not culture-specific. Use period "." as decimal separator, and do not use thousand separators. |
|
|
| priorities | An array of data filters used to sort content. Similar to data filters, except that where data filters exclude content, priorities change the order of content, prioritizing content whose data match the filter or sorting content by data value. key | The data key that is to be matched | compare | The comparison operator. Possible compare options are:= != < > <= >= asc desc | compareValue | String or decimal comparison value. Required for all comparison operators except asc and desc. Note |
---|
String data values will only be compared with string filter values, and numeric data values will only be compared with numeric filter values. So ensure that numeric values are entered as numbers, i.e. 5.9 not "5.9" . Numeric values are not culture-specific. Use period "." as decimal separator, and do not use thousand separators. |
|
|
Code Block |
---|
| {
"tags": [ "tag1", "tag2" ],
"fromDate": "2014-01-01T01:00Z", |
|
// optional - ISO UTC date
"limit": 2,
"offset": 10,
"data": [
{
|
|
// optional - default to 1offset10">",
"compareValue": 5.1
},
{
|
|
//optional - default to 0
comparebetween // optional ["=",<,">","<=",">=", }
],
"priorities": [
{
"key": "b",
"compare": ">",
|
|
//between, "empty", "notempty"]"compareValue1": 5.1,//requiredfor |
Response body: | JSON data with an array of content. The result will also contain a paging object detailing the number of content items returned, the offset and whether there are more items than the ones returned. Code Block |
---|
| {
"content": [
{
"tags": [ "tag1", "tag2" ],
|
|
// [""content": "PGh0bWw+PGJvZHk+TW9yZSBIVE1MIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg==",
" |
|
<,> "<=", ">=", "between"]compareValue25.9//requiredforcomparebetween
}Response body: | JSON data with information about the content searched.
Code Block |
---|
|
{"content":[ {"tags":["tag1",tag2],"contentType": "text/html"contentbase64 encoded content stringcreated0210T1253Zvalue19.5"2014-03-08T12:00:00Z"
},
{
"tags": [ "tag1", "tag2", "tag3" ],
"content": "PGh0bWw+PGJvZHk+SFRNTCBjb250ZW50PC9ib2R5PjwvaHRtbD4=",
"contentType": "text/html",
" |
|
content"base64 encoded content string" "a": 5.9,
"width": "200px"
},
"created": "2014-02- |
|
02T1502Z34Z"
}
],
"paging": {
"offset": 10,
"count": 2,
"more": true
}
} |
|
Status codes: | 200 | OK |
|
| |