Mobile Learner - Tasks API

List of the user's tasks with the corresponding enrollment

GET /api/mobile/learner/tasks

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • task_ids Array Required

    An array of Integer task_ids to be fetched by this request.

Example Requests

with comma separated task_ids
/api/mobile/learner/tasks?task_ids=1,2
with array task_ids
/api/mobile/learner/tasks?task_ids[]=1&task_ids[]=2

Example Response

{
  "items": [
    {
      "enrollment": {
        "id": 1,
        "end_at": "2023-08-01T05:59:59.999Z",
        "required": true,
        "state": "assigned",
        "approval": {
          "id": 1,
          "state": "incomplete"
        }
      },
      "enrollment_profile": {
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "5efcf4b6"
      },
      "template": {
        "id": 1,
        "attachments_count": 0,
        "description": null,
        "title": "Task1",
        "cover_slide_data": {
          "background_image_url": null
        },
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/checkpoints/1",
        "requires_approval": true,
        "requires_evidence": true
      }
    },
    {
      "enrollment": {
        "id": 2,
        "end_at": "2023-08-02T05:59:59.999Z",
        "required": true,
        "state": "assigned",
        "approval": null
      },
      "enrollment_profile": {
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "3bb3c718"
      },
      "template": {
        "id": 2,
        "attachments_count": 0,
        "description": null,
        "title": "Task2",
        "cover_slide_data": {
          "background_image_url": null
        },
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/checkpoints/2",
        "requires_approval": false,
        "requires_evidence": false
      }
    }
  ]
}

Task template with the corresponding enrollment

GET /api/mobile/learner/tasks/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Example Request

/api/mobile/learner/tasks/1

Example Response

{
  "enrollment": {
    "id": 2,
    "end_at": "2023-08-02T05:59:59.999Z",
    "required": true,
    "state": "assigned",
    "approval": null
  },
  "enrollment_profile": {
    "has_certificate": false,
    "open_enrollment": false,
    "uuid": "3bb3c718"
  },
  "type": "Task",
  "template": {
    "id": 2,
    "attachments_count": 0,
    "description": null,
    "title": "Task2",
    "cover_slide_data": {
      "background_image_url": null
    },
    "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/checkpoints/2",
    "requires_approval": false,
    "requires_evidence": false
  }
}