Author - Programs API

This endpoint controls the creation and maintenance of programs

Interfaces

Object Synopses

CreateProgramRequest

  • title String

    Title of program.

  • description String

    Description of program.

ProgramItem

  • item_type String Required

    The type of the item in the program.

  • item_id Integer Required

    The id of the item in the program.

UpdateProgramRequest

  • title String

    Title of program.

  • description String

    Description of program.

  • step_notifications Boolean

    Send Notification at Each Step

  • open_enrollment Boolean

    Indicates if enrollment is open to all users with enroll_url.

  • external_id String

    Optional. Identifier for linking to external systems.

  • default_days_until_due Integer

    Number of days from assignment to a learner until program is due.

  • default_due_on_date String

    Date on which all enrollments will be due.

  • expires Boolean

    Indicates if this program expires and must be retaken periodically.

  • auto_re_enroll Boolean

    Indicates if Bridge will re-enroll the learner automatically before expiration.

  • default_days_until_expiration Integer

    Number of days from assignment to a learner until program is expired.

  • re_enrollment_period Integer

    Number of days before expiration when Bridge will automatically re-enroll.

  • has_certificate Boolean

    Indicates if certificate is issued when program is successfully completed.

  • Items in the program, in order.

ProgramSubAccount

  • id Integer

    SubAccount id

  • name String

    The name of the subaccount

  • is_root Boolean

    Is this the root account

  • not_current Boolean

    Is this program outside the current subaccount

List programs

GET /api/author/programs

Note: the deleted_at element in the returned object is present only if deleted records were requested.

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • updated_after DateTime

    Query parameter. Filters list to only include courses updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Query parameter. Filters list to only include courses created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Query parameter. Filters list to only include courses deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Query parameter. Filters list to only include courses updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Query parameter. Filters list to only include courses created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Query parameter. Filters list to only include courses deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted programs.

  • with_deleted Boolean

    Filters list to also include deleted programs.

  • sort String [ newest, title, updated ]

    Query parameter. Applies a sort to the result list.

  • filters[] String [ unpublished, no_enrollments ]

    Query parameter. This argument may occur multiple times.

  • search String

    Query parameter. Search program titles for a match with the given string.

Example Response

{
  "meta": {},
  "programs": [
   {
      "id": "6",
      "title": "finish me",
      "created_at": "2018-10-30T23:37:07.864Z",
      "updated_at": "2018-11-28T09:58:33.000Z",
      "deleted_at": "2018-12-05T19:27:54.010Z",
      "description": "A program to finish",
      "course_count": 3,
      "item_count": 4,
      "is_published": true,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "has_shared_enrollments": false,
      "unfinished_learners_count": 2,
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14
    }
  ]
}

Create program

POST /api/author/programs

Response codes

  • 201 Created
  • 400 Bad Request
  • 401 Unauthorized

Parameters

  • programs CreateProgramRequest[] Required

    Body parameter. An array of {API::CreateProgramRequest} to be created.

Example Request

{"programs": [
    {"title": "Title-1"},
    {"title": "Title-2"}
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"programs":[{"title":"Title-1"},{"title":"Title-2"}]}' \
  http://<bridge>/api/author/programs
    

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "7",
      "title": "Title-1",
      "description": "Description 1",
      "course_count": 0,
      "item_count": 0,
      "is_published": false,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "is_non_linear": false,
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null
    },
    {
      "id": "18",
      "title": "Title-2",
      "description": "Description 2",
      "course_count": 0,
      "item_count": 0,
      "is_published": false,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "is_non_linear": false,
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null
    }
  ]
}

Publish program

POST /api/author/programs/:id/publish

Makes a program visible to non-authors

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "7",
      "title": null,
      "description": null,
      "course_count": 2,
      "item_count": 2,
      "is_published": true,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "not_finished": 0,
        "finished": 0
      },
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "19",
          "item_type": "CourseTemplate",
          "title": "tedt",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "19",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "tedt",
          "description": null,
          "is_published": true,
          "published_at": "2018-03-23T14:25:59.530-06:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 0,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 0,
      "open_enrollment": false,
      "uuid": "16e9f256",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/16e9f256/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null,
      "expires": false,
      "default_days_until_expiration": null,
      "auto_re_enroll": false,
      "re_enrollment_period": 14
    }
  ]
}

Delete a program

DELETE /api/author/programs/:id

Response codes

  • 204 No Content On successful deletion

Parameters

  • id Integer Required

    Path parameter. Program id.

Discard changes

POST /api/author/programs/:id/discard_changes

Discards unpublished changes to the program.

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "7",
      "title": null,
      "description": null,
      "course_count": 2,
      "item_count": 2,
      "is_published": true,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "not_finished": 0,
        "finished": 0
      },
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "19",
          "item_type": "CourseTemplate",
          "title": "tedt",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "19",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "tedt",
          "description": null,
          "is_published": true,
          "published_at": "2018-03-23T14:25:59.530-06:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 0,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 0,
      "open_enrollment": false,
      "uuid": "16e9f256",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/16e9f256/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null,
      "expires": false,
      "default_days_until_expiration": null,
      "auto_re_enroll": false,
      "re_enrollment_period": 14
    }
  ]
}

Show program

GET /api/author/programs/:id

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • id Integer Required

    The program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "1",
      "title": "My Test Program",
      "description": "My Test Program Description",
      "course_count": 3,
      "item_count": 4,
      "publishable": true,
      "is_published": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "item_count": 3,
      "unfinished_learners_count": 1,
      "external_id": null,
      "has_certificate": false,
      "enrollment_counts": {
        "all": 4,
        "overdue": 0,
        "not_finished": 2,
        "finished": 2
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "sub_accounts_exist": true,
        "is_root": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "4",
          "item_type": "CourseTemplate",
          "title": "test program final course",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "blocks_progress": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "4",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "test program final course",
          "description": null,
          "is_published": true,
          "published_at": "2017-12-07T10:29:09.247-07:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 3,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 1,
      "open_enrollment": false,
      "uuid": "2d3a2312",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/2d3a2312/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14,
      "expires": true,
      "default_days_until_expiration": null,
      "auto_re_enroll": true,
      "re_enrollment_period": 14
    }
  ]
}

Update a program

PATCH /api/author/programs/:id
PUT /api/author/programs/:id

Response Codes

  • 200 OK

Parameters

  • program UpdateProgramRequest Required

    Body parameter. A {API::UpdateProgramRequest} containing the fields to be updated.

Example Request

{
  "program": "{API::UpdateProgramRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"program":"{API::UpdateProgramRequest}"}' \
  http://<bridge>/api/author/programs/:id
    

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "1",
      "title": "My Test Program",
      "description": "My Test Program Description",
      "course_count": 3,
      "item_count": 4,
      "publishable": true,
      "is_published": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "item_count": 3,
      "unfinished_learners_count": 1,
      "external_id": null,
      "has_certificate": false,
      "enrollment_counts": {
        "all": 4,
        "overdue": 0,
        "not_finished": 2,
        "finished": 2
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "sub_accounts_exist": true,
        "is_root": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "4",
          "item_type": "CourseTemplate",
          "title": "test program final course",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "4",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "test program final course",
          "description": null,
          "is_published": true,
          "published_at": "2017-12-07T10:29:09.247-07:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 3,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 1,
      "open_enrollment": false,
      "uuid": "2d3a2312",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/2d3a2312/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14,
      "expires": true,
      "default_days_until_expiration": null,
      "auto_re_enroll": true,
      "re_enrollment_period": 14
    }
  ]
}

Clone a program

POST /api/author/programs/:id/clone

Response Codes

  • 200 OK
  • 401 Unauthorized
  • 403 Forbidden

Parameters

  • id Integer Required

    Path parameter. Program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "1",
      "title": "My Test Program",
      "description": "My Test Program Description",
      "course_count": 3,
      "item_count": 4,
      "publishable": true,
      "is_published": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "item_count": 3,
      "unfinished_learners_count": 1,
      "external_id": null,
      "has_certificate": false,
      "enrollment_counts": {
        "all": 4,
        "overdue": 0,
        "not_finished": 2,
        "finished": 2
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "sub_accounts_exist": true,
        "is_root": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "4",
          "item_type": "CourseTemplate",
          "title": "test program final course",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "blocks_progress": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "4",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "test program final course",
          "description": null,
          "is_published": true,
          "published_at": "2017-12-07T10:29:09.247-07:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 3,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 1,
      "open_enrollment": false,
      "uuid": "2d3a2312",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/2d3a2312/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14,
      "expires": true,
      "default_days_until_expiration": null,
      "auto_re_enroll": true,
      "re_enrollment_period": 14
    }
  ]
}

Archive a program

PUT /api/author/programs/:id/archive

Response Codes

  • 200 OK
  • 401 Unauthorized
  • 403 Forbidden
  • 422 Unprocessable Entity

Parameters

  • id Integer Required

    Path parameter. Program id.

Unarchive a program

PUT /api/author/programs/:id/unarchive

Response codes

  • 200 OK On successful un-archive
  • 422 Unprocessable Entity On unsuccessful un-archive

Parameters

  • id Integer Required

    Path parameter. Program id.