Request Spec: Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
},
"request": {
"userIdcontentId": "{{userIdcontentId}}", // required
"contentIdcollectionId" : "{{contentIdcollectionId}}" // requiredoptional
"collectionIdcontextId" : "{{collectionIdbatchId}}" // optional.required
}
} |
Sample Requests: Sample1: consume organic content Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:50:175+0000",
"params": {
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
}
"request": {
only when contextid is present
"contextIdcontentId" : "{{batchId}}" // optional
content_123"
} } |
Sample Requests: Sample1Sample2: consume organic content through collection Code Block |
---|
| SampleRequest1
{
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:5040:175575+0000",
"params": {
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
}
"request": {
"userIdcontentId" : "usercontent_123",
"contentIdcollectionId" : "contentcollection_123"
} |
Sample2Sample3: consume content through collectioncontext Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
}
"request": {
"userId" : "user_123",
"contentId" : "content_123",
"collectionIdcontextId" : "collectioncontext_123"
} |
Sample3Response: consume content through context 200 Ok Response: Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"resmsgid": null,
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
,
} "requesterr": {null,
"userIdstatus" : "user_123success",
"contentIderrmsg": null
: "content_123", },
"collectionIdresponseCode" : "collection_123OK",
"result": {
"contextId" : "context_123" "{{contentId}}": "Progress started"
}
} |
Response: 200 Ok 4XX or 5XX Error Response: Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"resmsgid": null,
"msgid": "5e763bc2-b072b072440d-440d-916e-da787881b1b9",
"err": nullERR_Error_Code,
"status": "successfailed",
"errmsg": nullERR_error_msg
},
"responseCode": "OKBAD_REQUEST"/"SERVER_ERROR",
"result": {
// "{{contentId}}": "Progress started"error message
}
} | 4XX or 5XX Error Sample Response:Sample1: Valid Request Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"resmsgid": null,
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
"err": ERR_Error_Codenull,
"status": "failedsuccess",
"errmsg": ERR_error_msgnull
},
"responseCode": "BAD_REQUEST"/"SERVER_ERROROK",
"result": {
// error message "content_123": "Progress started"
}
} |
Sample Response:Sample1: Valid Sample2: InValid Request Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"resmsgid": null,
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
"err": null"CLIENT_ERROR",
"status": "successFAILED",
"errmsg": nullERR_error_msg
},
"responseCode": "OKBAD_REQUEST",
"result": {
"content_123request.contentId": "Progress startedContent Id cannot be empty"
}
} |
Sample2Sample3: InValid Invalid ContextId in Request Code Block |
---|
| {
"id": "api.view.start",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"resmsgid": null,
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
"err": "CLIENT_ERROR",
"status": "FAILED",
"errmsg": ERR_error_msg
},
"responseCode": "BAD_REQUEST",
"result": {
"request.contentIdcontextId": "ContentInvalid Context Id cannot be empty"
}
} | Sample3: Invalid ContextId in Request |