Pearson
Always Learning

Overview

The DELETE Cartridge API removes a SCORM package (=cartridge) record from the Pearson SCORM Services Platform and the static content assets that were deployed to a content delivery network during a POST Cartridge request.

When the DELETE request is received by the Pearson SCORM Services Platform, a tracking number and a HTTP status code of 202 (Accepted) are returned. The status code 202 indicates that server has received and understood the request and that it has been accepted for processing. The command to delete is added to a queue and may not be processed immediately.

When the delete command is dequeued, the following workflow is executed:

  1. All progress information for all users of the SCORM package are deleted.
  2. The SCORM package records are deleted from the Pearson SCORM Services Platform.
  3. Static content assets from the unzipped SCORM package are removed from the content delivery network.

If there is any error, the work flow stops and a message is returned asynchronously to the Consumer.

When the workflow completes without error, a success message is returned asynchronously to the Consumer.

Sequence Diagram




Note that the DELETE Catridge API deletes from the Platform database all SCORM progress information for all learners for the SCORM package that is being removed. Outcomes that have been transmitted to external databases and grade books are not affected.

HTTP Verb Descriptions

HTTP Verb
Description
DELETE
A SCORM package is removed from the Platform

Security

The DELETE Cartridge 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.

API Routes/Parameters

/cartridges/{resource_id}@{resource_version}

Route/Resource Parameters

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

Request Header

The DELETE Cartridge 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:http://tools.ietf.org/html/rfc5849

Request Body

Supported for DELETE:

For all content types, the request body is left empty.

Request Body Parameters

n/a

Response Header

(To do)

Response Body

For DELETE:

Request content type: application/json

{"tracking_number":{trackingNumber}}

Request content type: application/xml

<CloudEnqueueResponse>
  <tracking_number>{trackingNumber}</tracking_number>
</CloudEnqueueResponse>

Request content type: application/x_www_form_urlencoded

tracking_number={trackingNumber}

Response Body Parameters

Name
Description
Valid Values
trackingNumber A number issued to the Consumer client that made the request that can be subsequently used to track the progress of the delete operations.
A positive, non-zero integer

Response HTTP Codes

Status Code
Description
Comment
202
Accepted
The server has received and understood the request and that it has been accepted for processing. The SCORM package URL has been added to a queue and may not be processed immediately.
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.
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

or if the Consumer client natively supports HTTP Delete:

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

Request Header

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

Request Body

n/a

Response

HTTP/1.1 202 Accepted

Response Body

{"tracking_number": 256675802}
2701 reads
Always Learning
Pearson