Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 13
Next »
Search for content available to a specific entity. The result may also include public content.
Endpoint ID: | 9004 |
Method: |
|
URL: | /content/tagged/dp-key/{dp-key}/search /content/tagged/ext-key/{ext-key}/{ext-type}/search |
| dp-key | dialogportal™ master key that uniquely identifies an entity |
| ext-key | External key that uniquely identifies an entity |
| ext-type | Type of external key |
Request body: | A JSON object describing the search parameters. Required fields: | | tags | An array of tags | Optional fields: | | limit | The maximum number of content items to return. If omitted, limit is set to 1. | | offset | A search offset, used together with limit to implement a paging system. 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. | | preferPrivate | When true, private content will be returned before public content. If omitted, preferPrivate is set to false . | | data | An array of data filters. All filters are applied, so the example below could be read as "data with key 'a' between 5.1 and 5.9, where there is no 'x' data" key | The data key that is to be matched | compare | The comparison operator. Possible compare options are:= != < > <= >= empty notempty | value | String or decimal comparison value. Required for all comparison operators except empty and notempty. |
|
{
"tags": [ "tag1", "tag2" ],
"preferPrivate": false,
"fromDate": "2014-01-01T01:00Z",
"limit": 2,
"offset": 10,
"data": [
{
"key": "a",
"compare": ">=",
"compareValue": 5.1
},
{
"key": "a",
"compare": "<=",
"compareValue": 5.9
},
{
"key": "x",
"compare": "isempty"
}
]
}
|
Response body: | JSON data with an array of content. The result also contains a paging object detailing the number of content items returned, the offset and whether there are more items than the ones returned.
{
"content": [
{ /* public content - no dpKey */
"tags": [ "tag1", "tag2" ],
"content": "PGh0bWw+PGJvZHk+TW9yZSBIVE1MIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg==",
"contentType": "text/html",
"data": {
"width": "300px",
"height": "50px",
"a": 5.5,
"b": 15
},
"created": "2014-02-10T12:53:42Z",
"activeFrom": "2014-03-01T12:00:00Z",
"activeTo": "2014-03-08T12:00:00Z"
},
{ /* private content - has dpKey */
"dpKey": 12345,
"tags": [ "tag1", "tag2", "tag3" ],
"content": "PGh0bWw+PGJvZHk+SFRNTCBjb250ZW50PC9ib2R5PjwvaHRtbD4=",
"contentType": "text/html",
"data": {
"a": 5.9
},
"created": "2014-02-08T09:00:34Z"
}
],
"paging": {
"offset": 10,
"count": 2,
"more": true
}
}
|
Status codes: | 200 | OK |
| 404.1 | Entity not found |
| 404.2 | External entity not found |
| 404.4 | Content not found |