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": {
"contentId": "{{contentId}}", // required
"collectionId" : "{{collectionId}}" // optional
"contextId": "{{batchId}}" // optional
}
} |
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": {
"contentId" : "content_123"
} |
Sample2: consume content through collection 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": {
"contentId" : "content_123"
"collectionId" : "collection_123"
} |
Sample3: consume content through context 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": {
"contentId" : "content_123",
"contextId" : "context_123"
} |
Response: 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",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"result": {
"{{contentId}}": "Progress started"
}
} |
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-b072-/api/v1/update
/api/v1/end440d-b072440d-916e-da787881b1b9",
"err": ERR_Error_Code,
"status": "failed",
"errmsg": ERR_error_msg
},
"responseCode": "BAD_REQUEST"/"SERVER_ERROR",
"result": {
// error message
}
} |
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": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"result": {
"content_123": "Progress started"
}
} |
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": "CLIENT_ERROR",
"status": "FAILED",
"errmsg": ERR_error_msg
},
"responseCode": "BAD_REQUEST",
"result": {
"request.contentId": "Content Id cannot be empty"
}
} |
Sample3: 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.contextId": "Invalid Context Id"
}
} |
|