Pearson
Always Learning

Overview

Consumer makes a request to POST Cartridge API or  Delete Cartridge API.   On successful acceptance of the request, a tracking number will be returned as a response to that request with the HTTP Status Code - 202 (Accepted) and a message will get pushed into Icodeon Queue for processing.    Icodeon system picks up and process the message in the queue one by one.  Post processing of the message, the status of request (either Success or Failure) will be notified back to the Consumer through Eventing.  Icodeon pushes an event into Eventing with the status and tracking number.  Eventing system picks up the event published into the queue by the publisher and broadcast the event to all subscribers by making HTTP POST to all subscriber's Call Back URL.

HTTP Verb Descriptions

HTTP Verb
Description
POST
Eventing post the key/value pairs to Consumer's Call Back URL in the request body. 

Request Header 

Content-Type : application/x-www-form-urlencoded

Content type of the request from Eventing to Call Back URL is always - application/x-www-form-urlencoded

Request Body 

Below are the various parameters which are being passed by Eventing in the Request Body while hitting the Call Back URL and the consumer is responsible to handle the form values.

DELIVERY-ATTEMPT-ID={deliveryAttemptId}&MESSAGE-TYPE={messageType}&MESSAGE-ID={messageId}&AUTHORIZATION={authorization}&AUTHORIZATION-DELIMITER={authorizationDelimiter}&PAYLOAD={payload}&PAYLOAD-CONTENT-TYPE={payloadContentType}

The value for PAYLOAD is represented in plain text or xml or json depends on value of PAYLOAD-CONTENT-TYPE. 

The content type used during POST Cartridge API or  Delete Cartridge API requests by the consumer is used for PAYLOAD-CONTENT-TYPE.  In other words, if the consumer interacts with a specific content type, the consumer will be notified with the status using the same PAYLOAD-CONTENT-TYPE.

Name 
Description 
Data Type 
Valid Values 
deliveryAttemptId
A string identifying the attempt at delivering the message. This field is intended solely for non-repudiation and troubleshooting.
string
guid
messageType
An arbitrary, predefined string identifying the type of message being delivered
string 

messageId
A unique identifier for each message delivered
string
guid
authorization
A string containing the concatenation of "[Principal_Id]|[Timestamp]|[CMAC]", where:

  • Principal_Id is the string identifier for the principal associated with the subscription (provided by eCollege)
  • Timestamp is an ISO8601 string representation of a date/time within 5 minutes of "now"
  • CMAC is the 128-bit CMAC digest of the bytes of <<Timestamp, MESSAGE-ID, MESSAGE-TYPE, PAYLOAD-CONTENT-TYPE, PAYLOAD>>
string 
 
authorizationDelimiter
Delimiter using which Authorization string is formed
byte
|
payload
The actual message payload itself
string
Valid string based on 
payloadContentType
Instructs the Icodeon Platform to deploy the SCORM package content to a content delivery network. 
string
text/plain

text/xml

application/json

Refer: Eventing Integration Guide (Version 1) - Consuming Messages - REST for for more details

Example Request for PAYLOAD-CONTENT-TYPE: text/plain

Request

POST http://consumerdomain.com/callbackurl

Request Header

POST http://consumerdomain.com/callbackurl HTTP/1.1
Content-Length: 363
Content-type: application/x-www-form-urlencoded

Request Body

DELIVERY-ATTEMPT-ID : 00000cc9-7328-40a4-aab2-944f0dfa96f1
MESSAGE-TYPE : cartridge.icodeon.pearson
MESSAGE-ID : 00000cc9-7329-2654-2d08-0f2fb2d01a67
AUTHORIZATION : ICODEON|2014-06-10T09:46:32Z|769a7af079a65196da2f1d34e4b45bf5
AUTHORIZATION-DELIMITER : |
PAYLOAD : Tracking Number :1643518793 | Status : Enqueue Successful.
PAYLOAD-CONTENT-TYPE : text/plain

Example Request for PAYLOAD-CONTENT-TYPE: text/xml

Request

POST http://consumerdomain.com/callbackurl

Request Header

POST http://consumerdomain.com/callbackurl HTTP/1.1
Content-Length: 603
Content-type:   application/x-www-form-urlencoded

Request Body

DELIVERY-ATTEMPT-ID : 00000cc9-736b-ccc8-2d08-0f2fb2d01a67
MESSAGE-TYPE : cartridge.icodeon.pearson
MESSAGE-ID : 00000cc9-736b-ccc7-2d08-0f2fb2d01a67
AUTHORIZATION : ICODEON|2014-06-10T09:47:16Z|fb6677f0fd73471f8dd6b0a70dbb20d4
AUTHORIZATION-DELIMITER : |
PAYLOAD : <EnqueueStatus xmlns="http://schemas.datacontract.org/2004/07/Icodeon.Data.NoSql.Entity" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>Enqueue Successful.</Message><Status>true</Status><TrackingNumber>893544638</TrackingNumber></EnqueueStatus>
PAYLOAD-CONTENT-TYPE : text/xml

Example Request for PAYLOAD-CONTENT-TYPE: application/json

Request

POST http://consumerdomain.com/callbackurl

Request Header

POST http://consumerdomain.com/callbackurl HTTP/1.1
Content-Length: 455
Content-type:   application/x-www-form-urlencoded

Request Body

DELIVERY-ATTEMPT-ID : 00000cc9-739c-7038-3b95-76d3eed24d94
MESSAGE-TYPE : cartridge.icodeon.pearson
MESSAGE-ID : 00000cc9-739a-9b57-2d08-0f2fb2d01a67
AUTHORIZATION : ICODEON|2014-06-10T09:47:50Z|1769d521fabd7cebabd7e32685abc512
AUTHORIZATION-DELIMITER : |
PAYLOAD : {"EnqueueStatus":{"TrackingNumber":"863939331","Status":"Enqueue Successful."}}
PAYLOAD-CONTENT-TYPE : application/json
1829 reads
Always Learning
Pearson