Pearson
Always Learning

Overview

The DELETE Progress API removes all the progress records for a given user with a given SCORM package (=cartridge).

Sequence Diagram




Note that the DELETE Progress API deletes from the Pearson SCORM Services Platform database all progress information for particular user for a given SCORM package. Outcomes that have been transmitted to external databases and grade books are not affected.

HTTP Verb Descriptions

HTTP Verb
Description
DELETE
Progress information for a user with a SCORM package is removed.

Security

The DELETE Progress request is secured by signing the request using the OAuth 1.0 signing protocol and placing the OAuth parameter name/value pairs into the header of the HTTP request. Only the signature method HMAC- SHA1 is supported.

For application/json and application/xml request content type requests the additional oauth_body_hash parameter must be included in the the header of the HTTP request. The OAuth Core specification provides body integrity checking only for application/x-www-form-urlencoded request bodies and so this additional parameter provides an integrity check on non-form-encoded request bodies. For more background see:

API Routes/Parameters

/cartridges/{resourceId}@{resourceVersion}/responses

Route/Resource Parameters

Name
Description
Valid Values
resourceId
Unique identifier used by the Consumer to identify the SCORM package zip file. (to do)
resourceVersion
Version number used by the Consumer to version the SCORM package zip file. Any positive, non-zero integer

Request Header

The DELETE Progress request is signed using the OAuth 1.0 sigining protocol and the oauth_* parameter name/value pairs are added to the request authorization header. For more background see:

Request Body

Supported for DELETE:

For all application/xml and application/json content types, the request body is a fragment of a Data Model for Content Object Communication (1484.11.3-2005 - IEEE Standard for Learning Technology)  document instance that specifies the user identifier for whom the progress information is to be deleted. Other content types are not supported because a Data Model for Content Object Communication document instance can only be expressed in JSON or XML.

Request content type: application/json

{
    "learnerId": {
        "spm": "4000",
        "Value": "{consumerUserId}"
    }
}

Request content type: application/xml

<cocd xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://ltsc.ieee.org/xsd/1484_11_3">
    <learnerId spm="4000">{consumerUserId}</learnerId>
</cocd>

Request Body Parameters

Name
Description
Data Type
Valid Values
consumerUserId The unique identifier for a user that is maintained by the Consumer. The same value that was used for the user_id parameter value when the Consumer made a Launch Player request.
string

Response Header

(To do)

Response Body

For DELETE:

Request content type: application/json

{
  "startIndex": {startIndex},
  "itemsPerPage": {itemsPerPage},
  "totalResults": {totalResults},
  "entry": {
    "{responseId}": {
      "response_id": "{responseId}",
      "status": {status}
    }
  }
}

Request content type: application/xml

<response xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://ns.opensocial.org/2008/opensocial">
    <startIndex>{startIndex}</startIndex>
    <itemsPerPage>{itemsPerPage}</itemsPerPage>
    <totalResults>{totalResults}</totalResults>
    <entry>
        <appData>
            <id>{responseId}</id>
            <entry>
                <key>response_id</key>
                <value xsi:type="xsd:string">{responseId}</value>
            </entry>
            <entry>
                <key>status</key>
                <value xsi:type="xsd:int">{status}</value>
            </entry>
        </appData>
    </entry>
</response>

Response Body Parameters

Name
Description
Valid Values
startIndex
The start index when paging through a record set of all deleted progress information records.
Zero or positive integer
itemsPerPage
The number of deleted progress information records in one page of the record set.
Zero or positive integer
totalResults
The total number of deleted progress information records. Zero or positive integer
responseId
The unique identifier of a particular deleted progress information record.
(to do)
status
  200

Response HTTP Codes

Status Code
Description
Comment
200
OK
Progress records deleted or no progress to delete for the Consumer User.
400
Bad Request
Mandatory parameters were missing from the request.
401
Not Authorized
The server could not validate the OAuth signature that accompanied the request.
404
Not Found
The Cartridge record, or the Consumer User record, was not found.
500
Internal Server Error
The server encountered some problem.

Example Request/Response for Content Type application/json

Request

Some HTTP clients do not support HTTP DELETE, and in these cases we can overload HTTP POST to "tunnel" a delete request (see here) and add an X-HTTP-Method-Override to the request headers. 

POST http://platform.icodeon.com/cartridges/icn-icodeon_multi_sco@1/responses

or if the Consumer client natively supports HTTP Delete:

DELETE http://platform.icodeon.com/cartridges/icn-icodeon_multi_sco@1/responses

Request Header

POST http://platform.icodeon.com/cartridges/icn-icodeon_multi_sco@1/responses  HTTP/1.1
Content-Length: 452
Authorization:  OAuth realm="",
                oauth_version="1.0",
                oauth_nonce="29f90c047a44b2ece73d00a09364d49b",
                oauth_timestamp="1313350943",
                oauth_consumer_key="wrt45h9se628f6gh99d56b0a592e7g27",
                oauth_body_hash="t%2BcGtdDSHV%2Fj67sdxLwkFILfgPo%3D",
                oauth_signature_method="HMAC-SHA1",
                oauth_signature="8auRpRdPY2KRXUrOyz3HKCs92y8%3D"
Content-type:   application/json
X-HTTP-Method-Override: DELETE

Request Body

{
    "learnerId": {
        "spm": "4000",
        "Value": "gujxz53k"
    }
}

Response

HTTP/1.1 200 OK

Response Body

{
  "startIndex": 0,
  "itemsPerPage": 10,
  "totalResults": 3,
  "entry": {
    "6cf5990a-305d-42f4-b450-bf4502ddf02f": {
      "response_id": "6cf5990a-305d-42f4-b450-bf4502ddf02f",
      "status": 200
    },
    "e34dd87b-2729-489e-bf68-74f82475d494": {
      "response_id": "e34dd87b-2729-489e-bf68-74f82475d494",
      "status": 200
    },
    "194fef2d-b0f9-45d1-b893-08f4b31f0036": {
      "response_id": "194fef2d-b0f9-45d1-b893-08f4b31f0036",
      "status": 200
    }
  }
}
2947 reads
Always Learning
Pearson