Introduction:
This wiki give the details about Viewer Service API(s) Spec design details.
Base Request Spec:
...
language | json |
---|
...
Introduction:
This wiki give the details about Viewer Service API(s) Spec design details.
Base Request Spec:
Authorization and x-authenticated-user-token are mandatory headers in every request
UserId will be captured using the user-token from headers for all api requests
Code Block | ||
---|---|---|
| ||
{
"id": "api.view", // required. id of the api request
"ver": "1.0", // required. Current version of api
"ts": "2021-01-01T00:00:00+05:30", //mandatory. Timestamp of the request
"params": {
"msgid": "4f04da60-1e24-4d31-aa7b-1daf91c46341" // unique request message id, UUID
},
"request": { // required
....
....
}
|
API Spec
Content View Start
Expand | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||
Request Spec:
Sample Requests: Sample1: consume organic content
Sample2: consume content through collection
Sample3: consume content through context
Response: 200 Ok Response:
|
API Spec
Content View Start
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
Request Spec:
4XX or 5XX Error Response:
SampleRequestsResponse:Sample1: consume organic contentValid Request
Sample2: consume content through collectionInValid Request
Sample3: consume content through contextInvalid ContextId in Request
Response: 200 Ok Response |
Content View Update
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
Request:
4XX or 5XX Error Response:
Sample Response:Sample1: Valid Request
Sample Requests: Sample1: Without Context
Sample2: InValid Request
Sample1: With Context
|
Content View Update
Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
Request:
Response:
Sample Requests: Sample1: Without Context |
Content View End
Expand | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
Request:
Sample1: With Context
Sample Request: Sample1: Without Context
ResponseSample2: With Context
Response:
|
Content View EndRead
Expand | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
Request:
Response:
Sample Request: Sample1: Without Context
Sample Response: Sample2: With Context Code Block | | language | json
Code Block |
---|
{ "id": "api.view.endread", "ver": "v1", "ts": "2021-06-23 05:37:40:575+0000", "params": { "resmsgid": null, "msgid": "5e763bc2-b072-440d-916e-da787881b1b9" } "request": {, "userIderr" : "user_123"null, "contentIdstatus" : "content_123success", "collectionIderrmsg": : "collection_123",null }, "contextIdresponseCode" : "context_123OK", } |
Response:
Code Block | ||
---|---|---|
| ||
"result": { "iduserId": "api.view.end",user_123" "vercontentId": "v1content_123", "tstype": "2021-06-23 05:37:40:575+0000","content" "paramscontents":[{ { "resmsgidcontentid" : null"content_123", "msgidcollectionid" : "5e763bc2-b072-440d-916e-da787881b1b9","content_123", "errcontenxtid" : null,"content_123" "status" : "success1", "errmsgprogressDetails": { null }, "responseCodemimeType" : "OK",application/video" "resultprogress" :20 { "{{contentId}}": "Progress ended"} }] } } |
Content View Read
Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
Request: Example2: With context or collection
Response:
|
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
Request:
Sample Response: Sample1: Without context code
Sample Response:
Example2: With context
|
Content Submit Assess
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Request:
Response:
|
...
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Request:
Response:
|
...
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Response:
Sample Response: Sample1:
|
...
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Request:
Response:
|
Viewer Summary Delete
Expand | |||||
---|---|---|---|---|---|
| |||||
Response:
|
Viewer Summary Download - Default Format : CSV
Expand | ||
---|---|---|
| ||
Response:
| ||
Expand | ||
| ||
Request:
|
Expand | |||||
---|---|---|---|---|---|
| |||||
Response:
|
Viewer Summary Download - Default Format : CSVDelete
Expand | |||||
---|---|---|---|---|---|
| |||||
Response:
|
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Request:
| |||||||
Expand | |||||||
title | GET - /v1/summary/download/:userId?format=jsonResponse:
|
Clarifications:
For assessment submit, do we need consider the assess events without context as wellIn the summary list api, if the context is program, how to show the program metadata