This web service responds with a report showing the types of content uploaded to a portal over a period of time.
Method | Endpoint |
---|---|
POST |
/analytics/api/v1/khub/time-report |
Request example
The following lines show an example of a JSON request body:
{
"startDate":"2022-09-01",
"endDate":"2022-10-01",
"groupByPeriod":"month",
"filters": {
"type": ["books", "topics"]
}
}
Field | Type | Required? | Description |
---|---|---|---|
startDate |
String | Yes | The inclusive start date of the period. Must be in the past year. |
endDate |
String | Yes | The exclusive end date of the period. Must be later than the startDate . |
groupByPeriod |
String | Yes | The period by which to group the events. Valid values are month , week , and day . |
filters |
Object | No | An optional field to filter results. If this field is absent or undefined, the web service returns data for all types. |
type |
Array | No | An array containing the types of the publications to retrieve. Valid values are books , unstructuredDocuments , articles , topics , and mapAttachments . If undefined, the web service returns data for all types. |
Return code | Description |
---|---|
200 OK |
Returns zero or more results. |
401 UNAUTHORIZED |
The authorization header is absent or invalid. |
For a list of all possible return codes, see Return codes.
Response body
The following lines show an example of a JSON response body:
{
"startDate": "2022-09-01",
"endDate": "2022-09-30",
"groupByPeriod": "month",
"results": [
{
"type": "books",
"periods": [
{
"periodStartDate": "2022-09-01",
"periodEndDate": "2022-09-30",
"count": 24
}
]
},
{
"type": "topics",
"periods": [
{
"periodStartDate": "2022-09-01",
"periodEndDate": "2022-09-30",
"count": 42
}
]
}
]
}
Field | Type | Description |
---|---|---|
startDate |
String | The inclusive start date of the period. |
endDate |
String | The exclusive end date of the period. |
groupByPeriod |
String | The period by which results are grouped. Can be month , week , or day . |
results |
Array | An array containing the results. |
type |
String | The content type. Can be books , unstructuredDocuments , articles , topics , or mapAttachments . |
periods |
Array | An array containing data for the requested periods. |
periodStartDate |
String | The inclusive start date of the period. |
periodEndDate |
String | The exclusive end date of the period. |
count |
Number | The number of publications uploaded to a portal during the period. |