Search¶
Calls to search are used to retrieve the search results from issue content of an App.
URL¶
Request Parameters¶
Name | Type | Description | Required |
---|---|---|---|
appId | String | The id of the requesting app | YES |
platform | String (android/ios/kindle) | Platform of the device | YES |
preview | Boolean (true/false) | Is the requesting app a test (true) or production (false) app | NO, defaults to false |
locale | String | Language locale like de_DE or en_US | YES |
model | String | Model identifier like iPhone 4S, some kind of model number (iOS only) | NO |
smallestScreenWidthDp | Integer | Density-Independent Pixels of the smallest screen width (Android only) | NO |
Note
The paramters model
and smallestScreenWidthDp
are used to filter the results by device class (phone / tablet). If they are omitted all
results will be returned even if the containing issue is not shown on the requesting device.
Request Body¶
Name | Type | Description | Required |
---|---|---|---|
issueIds | List<String> | when content search is active limit search to issues with given ids | NO, defaults to no limit |
publicationIds | List<String> | when content search is active limit search to issues from publications with given ids | NO, defaults to no limit |
phrase | String | the search phrase | YES |
fuzzy | Boolean (true/false) | use a fuzzy search | NO, defaults to false |
sortPages | Boolean (true/false) | sort the search hits by pages of the issues | NO, defaults to false |
findAll | Boolean (true/false) | find all words of the search phrase (any word otherwise) | NO, defaults to false |
{
"issueIds": ["xxx"],
"publicationIds": ["xxx"],
"phrase": "xxx",
"fuzzy": true,
"sortPages": true,
"findAll": true
}
Request Headers¶
Name | Type | Content | Required |
---|---|---|---|
Authorization | String | Token <authToken> results from entitled issues are only returned if the authToken grants access to these issues |
NO |
Content-Type | String | application/json |
YES |
Response Codes¶
Http Status Code | Reason |
---|---|
200 - OK |
Response Headers¶
Name | Type | Content |
---|---|---|
Content-Type | String | application/json;charset=UTF-8 |
Content-Length | int | Length of json |
Response Body¶
A JSON Response is returned.
{
"numberOfIssueHits": 1,
"numberOfPageHits": 2,
"issues": [
{
"issueId": "xxx",
"publicationId": "xxx",
"pages": [
{
"pageIndex": 0,
"pageNumber": 1,
"pageLabel": "1",
"pageTitle": "",
"excerpt": "... <strong>xxx/strong> ..."
},
{
"pageIndex": 5,
"pageNumber": 6,
"pageLabel": "10",
"pageTitle": "",
"excerpt": "... <strong>xxx/strong> ..."
}
]
}
]
}