Get search content type facet list
OVERVIEW
Overview
Get the list of content type facets from a search within Publisher
Since v5.0
HTTP Request
GET /api/2/search/filters/contenttypes?{parameters}
URL Query Parameters
Parameter | Format | Description |
---|---|---|
user | String |
If the requester would like to perform the search on behalf of another user they have the ability to optionally use this parameter. If a user is not provided, it will provide results from the user who is calling the API. If user=PUBLIC is provided, it will retrieve content types that are available to be viewed by a public user (if any). GET /api/2/search/filters/contenttypes?user=user.name@example.com |
language | String |
The language to retrieve the content types in. If language is not provided for a user, it will provide results in that user's default language. If a language is not provided for PUBLIC, it will provide results in the system default language. GET /api/2/search/filters/contenttypes?language=fr_FR |
HTTP Headers
HTTP Request Header | Description | Example |
---|---|---|
Authorization | The API Authorisation token | "Bearer XXXXXXXXXXXXX" |
Accept |
The format of the expected response
If no parameter is set, JSON is the default response given. |
"application/xml" |
Content-Type |
The format of the provided content
If no parameter is set, JSON is the expected content by default. |
"application/json" |
HTTP Response
Success
HTTP response 200 with search content facet type object list
(Example below)
Example HTTP Request & Response
GET http://example.com/context/api/2/search/filters/contenttypes
JSON Response
{
"totalcount": 8,
"total": 8,
"currentpage": 0,
"contenttypes": [
{
"id": 3,
"name": "Publications"
},
{
"id": 5,
"name": "Videos"
},
{
"id": 7,
"name": "Comparison toolkits"
},
{
"id": 10,
"name": "Microsites"
},
{
"id": 11,
"name": "Events"
},
{
"id": -2,
"name": "Pages"
},
{
"id": -1,
"name": "People"
},
{
"id": -3,
"name": "Dashboard"
}
]
}
Comments
0 Comments