Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replace "value" with "data" dictionary

...

Endpoint ID:

9005

Method:

URL:

POST /data/content/search

Request body:

A JSON object describing the search parameters.

Required fields:
 tagsAn array of tags
Optional fields:
 limitThe maximum number of content to return. If omitted, "limit" is set to 1.
 offsetThe offset in search results from where to return data. If omitted, "offset" is set to 0.
 fromDateUTC date used to filter search results by the content "activeFrom" date if it exists, or otherwise the "created" date.
 compareUsed to filter the search results by content "value"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'"

keyThe data key that is to be matched
compareThe comparison operator. Possible "compare" options are:
= != < > <= >= 
between Decimal
empty notempty
 compareValue1
value

String or decimal comparison value. Required

if "compare" is one of
= < > <= >= between
 compareValue2Decimal comparison value. Required if "compare" has value "between"

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.

Code Block
titleExample
{
   "tags": [ "tag1", "tag2" ],
   "fromDate": "2014-01-01T01:00Z",
   "limit": 2,
   "offset": 10,
   "data": [
      {
         "key": "a",
         "compare": "between>",
         "compareValue1compareValue": 5.1
      },
   "compareValue2": 5.9   {
         "key": "width",
         "compare": "!=",
         "compareValue": "250px"
      }
   ]
}

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
titleExample
{
   "content": [
      {
         "tags": [ "tag1", "tag2" ],
         "content": "PGh0bWw+PGJvZHk+TW9yZSBIVE1MIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg==",
         "contentType": "text/html",
         "content"data": {
            "width": "PGh0bWw+PGJvZHk+TW9yZSBIVE1MIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg==300px",
            "createdheight": "2014-02-10T12:53:42Z50px",
            "valuea": 5.5,
            "b": 15
         },
         "created": "2014-02-10T12:53:42Z",
         "activeFrom": "2014-03-01T12:00:00Z",
         "activeTo": "2014-03-08T12:00:00Z"
      },
      {
         "tags": [ "tag1", "tag2", "tag3" ],
         "content": "PGh0bWw+PGJvZHk+SFRNTCBjb250ZW50PC9ib2R5PjwvaHRtbD4=",
         "contentType": "text/html",
         "contentdata": {
       "PGh0bWw+PGJvZHk+SFRNTCBjb250ZW50PC9ib2R5PjwvaHRtbD4="     "a": 5.9,
            "createdwidth": "2014-02-08T09:00:34Z"200px"
         },
         "valuecreated": 5.9"2014-02-08T09:00:34Z"
      }
   ],
   "paging": {
      "offset": 10,
      "count": 2,
      "more": true
   }
}
Status codes:200OK
 404.4No Content found

...