Skip to content
Dirk Uys edited this page May 28, 2013 · 1 revision

MMOOC API

Sequences

GET /sequences

Returns a list of sequences for the course

  • Request parameters: none
  • Response:
    • total_sequences: An integer of the total amount of sequences created for the course
  • Response example:
{
    "total-sequences": 3
}

POST /sequences

Creates a new sequence

  • Request parameters: none
  • Response:
    • sequence_id: The id of the newly created seqeunce. It's a auto-incrementing integer.
  • Response example:
{
  "sequence-id": 4
}

GET /sequences/<sequence-id>

Returns the sequence's information.

DELETE /sequences/<sequence-id>

Deletes the sequence with the sequence id

  • Request parameters: none
  • Response: success or error

Users

GET /sequences/<sequence-id>/users

Returns a list of users that are registered for the sequence

POST /sequences/<sequence-id>/users

Creates a user for the sequence

GET /sequences/<sequence-id>/users/<user-id>

Returns the user's information

PUT /sequences/<sequence-id>/users/<user-id>

Updates a users information

DELETE /sequences/<sequence-id>/users/<user-id>

Deletes a user from the sequence

Emails

GET /sequences/<sequence-id>/emails

Returns a list of emails for the sequence

POST /sequences/<sequence-id>/emails

Creates an email for the sequence

POST /sequences/<sequence-id>/duplicate-emails

Duplicate emails from this sequence to a new one.

  • Request parameters:
    • duplicate-to-sequence-id: The destination of where to duplicate the emails
    • date-conversion: How to update the dates of the emails
      • none: don't change the dates at all
      • new-start-date: The new date of the first email. Subsequent email are made the same offset from the start
      • delete: Delete the dates so they are forced to be rescheduled
    • new-start-date: The date of the first email to be sent. (Only valid if date-conversion is set to 'new-start-date')
  • Request Example
{
  "duplicate-to-sequence-id": 5,
  "date-conversion": "new-start-date",
  "new-start-date": "2013-03-14 09:30"
}
  • Returns: success or error

GET /sequences/<sequence-id>/emails/<email-id>

Returns the email's information

PUT /sequences/<sequence-id>/emails/<email-id>

Updates the email's information

DELETE /sequences/<sequence-id>/emails/<email-id>

Deletes the email from the sequence