Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Private content searchSearch for content available to a specific user. The result may also include public content.

 

Endpoint ID:

9004

Method:

URL:

POST: /user/dp-key/{dpKeydp-key}/content/search
POST: /user/ext-key/{extKeyext-key}/{extTypeext-type}/content/search

 dp-keydialogportal™ master key that uniquely identifies the account to search content.
 ext-keyExternal key that uniquely identifies the account to search content.
 ext-typeType of external key

Request body:

JSON data with information about the content to be searchedA JSON object describing the search parameters.

Required fields:
 

compareValue1:

Required if "compare" has value. Possible valid values of "compare" are ["=", "<", ">", "<=", ">=", "between"]

 

compareValue2:

Required if "compare" has value "between"

tagsAn array of tags
Optional fields:
 tags:JSON array of Tags.
 preferPrivateIf omitted, preferPrivate is set to "false".
 fromDate:Date value defining content active start date. The date must be in UTC, for example "2014-01-01T01:00Z".
 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.
 compare:Defines logical operator to be applied for search criteria. Possible valid values are ["=", "<", ">", "<=", ">=","between", "empty", "notempty"]fromDateUTC date used to filter search results by the content "activeFrom" date if it exists, or otherwise the "created" date.
 compare
Used to filter the search results by content "value". Possible "compare" options are:
= < > <= >= between empty notempty
 compareValue1

Decimal comparison value. Required if "compare" is one of

= < > <= >= between
 compareValue2Decimal comparison value. Required if "compare" has value "between".
 preferPrivateWhen true, private content will be returned before public content. If omitted, "preferPrivate" is set to "false".
Code Block
titleExample
{
   "tags": [ "tag1", "tag2" ],
   "preferPrivate": false,                     // optional - default to false
   "fromDate": "2014-01-01T01:00Z",            // optional - ISO UTC date
   "limit": 2,                               
 // optional - default to 1
   "offset": 10,                  
            // optional - default to 0
   "compare": "between",                       // optional ["=", "<", ">", "<=", ">=",
                                               //    "between",
"empty", "notempty"]    "compareValue1": 5.1,                       // required for "compare":
                                               //    ["=", "<", ">", "<=",
">=", "between"]    "compareValue2": 5.9                      
 // required for "compare": "between"
}

Response body:

JSON data with information about the content searchedan 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": [
      {                                        //* public content - no entityID dpKey   */
         "tags": [ "tag1", "tag2" ],
         "contentType": "text/html",
         "content": "base64 encoded content stringPGh0bWw+PGJvZHk+TW9yZSBIVE1MIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg==",
         "created": "2014-02-10T12:53Z53:42Z",
         "value": 19.55.5,
         "activeFrom": "2014-03-01T12:00:00Z",
         "activeTo": "2014-03-08T12:00:00Z"
      },
      {                                        //* private content - has dpKey */
         "entityIDdpKey": 12345,
         "tags": [ "tag1", "tag2", "tag3" ],
         "contentType": "text/html",
         "content": "base64 encoded content stringPGh0bWw+PGJvZHk+SFRNTCBjb250ZW50PC9ib2R5PjwvaHRtbD4=",
         "created": "2014-02-08T09:00Z":00:34Z",
         "value": 5.9
      }
   ],
   "paging": {
      "offset": 10,
      "count": 2,
      "more": true
   }
}

Status codes:

201200

CreatedOK

 404.1User not found
 404.2External user could not be found
 404.4

No Content not found