{"swaggerDoc":{"swagger":"2.0","info":{"description":"ContentService API","version":"1.0.0","title":"Swagger ContentService","contact":{"email":"info@laerdal.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"contentservice.net","basePath":"/api/v1","tags":[{"name":"user","description":"Operations about user"},{"name":"report","description":"Reports about compliance & course failures"}],"schemes":["https"],"securityDefinitions":{"bearer":{"type":"oauth2","authorizationUrl":"http://swagger.io/api/oauth/dialog","flow":"implicit","scopes":{"write:users":"foo","read:users":"foo"}}},"security":[{"bearer":["write:users","read:users"]}],"paths":{"/hierarchies/tcid/{tcid}/organization/{orgid}":{"parameters":[{"in":"path","name":"tcid","description":"The tool consumer id of the CDP installation","type":"string","required":true},{"in":"path","name":"orgid","description":"The CDP id of the organization","type":"string","required":true}],"post":{"tags":["hierarchy"],"summary":"Inserts a full hierarchy, provided in the request body.","parameters":[{"in":"body","name":"body","description":"Hierarchy to insert","required":true,"schema":{"type":"object","required":["hierarchy"],"properties":{"hierarchy":{"$ref":"#/definitions/OrganizationHierarchy"}}}}],"responses":{"200":{"description":"Post succeeded","schema":{"type":"object","properties":{"status":{"type":"string"}}}},"400":{"description":"The request was called with invalid parameters","schema":{"$ref":"#/definitions/ErrorMessage"}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}},"get":{"tags":["hierarchy"],"summary":"Gets the full hierarchy, of the organization associated with the access token.","responses":{"200":{"description":"Get succeeded","schema":{"type":"object","required":["hierarchy"],"properties":{"hierarchy":{"$ref":"#/definitions/OrganizationHierarchy"}}}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"The organization does not exist, or the organization contains no hierarchy","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}}},"/hierarchies/tcid/{tcid}/organization/{orgid}/org_unit/{id}":{"parameters":[{"name":"tcid","in":"path","description":"The tool_consumer_id.","required":true,"type":"string"},{"name":"orgid","in":"path","description":"The external id of the org unit to be modified or inserted.","required":true,"type":"string"},{"name":"id","in":"path","description":"The external id of the org unit to be modified or inserted.","required":true,"type":"string"}],"put":{"tags":["hierarchy"],"summary":"Updates an existing org unit, or inserts a new org unit if the provided org unit does not yet exist.","parameters":[{"in":"body","name":"body","description":"Organization unit to insert","required":true,"schema":{"$ref":"#/definitions/OrganizationUnit"}}],"responses":{"200":{"description":"Put succeeded, the org unit was updated or inserted.","schema":{"type":"object","properties":{"status":{"type":"string"}}}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"The parent id of the organization unit was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}}},"/hierarchies/tcid/{tcid}/organization/{orgid}/users/{lms_user_id}":{"parameters":[{"in":"path","name":"tcid","description":"The tool consumer id of the CDP installation","type":"string","required":true},{"in":"path","name":"orgid","description":"The CDP id of the organization","type":"string","required":true},{"in":"path","name":"lms_user_id","description":"The id associated with the user in the lms. Assumed to be unique within the organization","type":"string","required":true}],"put":{"tags":["hierarchy"],"summary":"Upsert a user that is associated with an organization unit.","parameters":[{"in":"body","name":"body","description":"Values for the user to be upserted.","required":true,"schema":{"$ref":"#/definitions/hierarchyUser"}}],"responses":{"200":{"description":"User upserted succesfully.","schema":{"type":"object","properties":{"status":{"type":"string"}}}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"The org unit associated with the user was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}},"get":{"tags":["hierarchy"],"summary":"Gets a user by lms_user_id, that is associated with an organization unit.","parameters":[{"in":"query","name":"org_unit_id","description":"Not used - only specified for backwards compatibility","type":"string","required":false}],"responses":{"200":{"description":"The requested user","schema":{"$ref":"#/definitions/hierarchyUser"}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"The user was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}},"patch":{"tags":["hierarchy"],"summary":"Set the active flag on a user","parameters":[{"in":"body","name":"body","description":"Values to patch","required":true,"schema":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean","example":false,"description":"Whether the user is active (true) or inactive (false)"}}}}],"responses":{"200":{"description":"Patch succeeded","schema":{"type":"object","properties":{"status":{"type":"string"}}}},"400":{"description":"The request was called with invalid parameters","schema":{"$ref":"#/definitions/ErrorMessage"}},"403":{"description":"Unauthorized. Organization included in token is different than assignment's organization","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"Resource not found","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorMessage"}}}},"delete":{"tags":["hierarchy"],"summary":"Deletes a user by lms_user_id, that is associated with an organization unit.","parameters":[{"in":"path","name":"lms_user_id","description":"The lms_user_id associated with the user.","required":true,"type":"string"}],"responses":{"200":{"description":"User deleted succesfully.","schema":{"type":"object","properties":{"status":{"type":"string"}}}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"The user was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}}},"/launch_lti":{"post":{"tags":["LTI launch"],"summary":"LTI launch","description":"Endpoint for doing a LTI launch. Further description of LTI parameters can be found at https://www.imsglobal.org/specs/ltiv1p1/implementation-guide.","parameters":[{"in":"query","name":"manifest_id","description":"id of the course that is to be launched","required":true,"type":"string"},{"in":"query","name":"launch_as","enum":["learner","administrator"],"description":"If this is not included in the query then an intermediate page is shown where one can choose to launch as administratior (if has administrator role) or learner. This field is required if custom_return_format is set to JSON in order to skip intermediate page","type":"string"},{"in":"query","type":"string","name":"test_today_date","description":"Test date to simulate MOC launch across dates. Only applicable to test courses. Format is YYYY-MM-DD"},{"in":"body","name":"body","description":"Values for LTI launch","required":true,"schema":{"$ref":"#/definitions/LtiLaunch"}}],"responses":{"200":{"description":"Launch succeeded","schema":{"$ref":"#/definitions/LtiLaunchResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"Resource not found","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorMessage"}}}}},"/assignments":{"patch":{"tags":["assignment"],"summary":"Updates assignments","description":"The only supported use for this endpoint at the moment is to complete a course","operationId":"patchAssignments","parameters":[{"in":"query","name":"lis_result_sourcedid","description":"The lis identifier for the course. This is returned during launch. When launching a curriculum, this value is also returned for every course inside the curriculum","required":true,"type":"string"},{"in":"body","name":"body","description":"Values to patch","required":true,"schema":{"type":"object","properties":{"result_score":{"type":"number","example":1,"description":"The new score for the assignment. Only the value 1 is accepted at the moment"}}}}],"responses":{"200":{"description":"Patch succeeded"},"400":{"description":"The request was called with invalid parameters","schema":{"$ref":"#/definitions/ErrorMessage"}},"403":{"description":"Unauthorized. Organization included in token is different than assignment's organization","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"Assignment could not be found","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorMessage"}}}},"put":{"tags":["assignment"],"summary":"Updates assignments","description":"Change the state of an assignment","operationId":"putAssignments","parameters":[{"in":"query","name":"lis_result_sourcedid","description":"The lis identifier for the course. This is returned during launch. When launching a curriculum, this value is also returned for every course inside the curriculum","required":true,"type":"string"},{"in":"query","name":"user_id","description":"The id of the user associated with the assignment.","required":true,"type":"string"},{"in":"body","name":"body","description":"Values to patch","required":true,"schema":{"type":"object","properties":{"active":{"type":"boolean","example":true,"description":"The status of the attempt"}}}}],"responses":{"200":{"description":"Patch succeeded"},"400":{"description":"The request was called with invalid parameters","schema":{"$ref":"#/definitions/ErrorMessage"}},"403":{"description":"Unauthorized. Organization included in token is different than assignment's organization","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"Assignment could not be found","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorMessage"}}}}},"/users/{lms_user_id}":{"patch":{"tags":["user"],"summary":"Set the active flag on a user","operationId":"patchUsers","parameters":[{"in":"path","name":"lms_user_id","description":"The lms user id of the user that needs to be modified","required":true,"type":"string"},{"in":"body","name":"body","description":"Values to patch","required":true,"schema":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean","example":false,"description":"Whether the user is active (true) or inactive (false)"}}}}],"responses":{"200":{"description":"Patch succeeded"},"400":{"description":"The request was called with invalid parameters","schema":{"$ref":"#/definitions/ErrorMessage"}},"403":{"description":"Unauthorized. Organization included in token is different than assignment's organization","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"Resource not found","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorMessage"}}}},"delete":{"tags":["user"],"summary":"Deletes a user by lms_user_id.","parameters":[{"in":"path","name":"lms_user_id","description":"The lms_user_id associated with the user.","required":true,"type":"string"}],"responses":{"200":{"description":"User deleted succesfully.","schema":{"type":"object","properties":{"status":{"type":"string"}}}},"403":{"description":"The organization, that this bearer token is authorizing, was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"404":{"description":"The user was not found.","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error.","schema":{"$ref":"#/definitions/ErrorMessage"}}}}},"/users/{id}/compliance_history":{"get":{"tags":["user"],"summary":"Get a users compliance report","parameters":[{"name":"id","in":"path","description":"The id of the user that needs to be fetched","required":true,"type":"string"},{"name":"manifest_id","in":"query","type":"string","required":true,"description":"The id of the manifest for which to get the compliance history"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/UserComplianceHistory"}},"204":{"description":"No content"},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorMessage"}},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"Resource not found","schema":{"$ref":"#/definitions/ErrorMessage"}},"500":{"description":"Internal server error"}}}},"/tcs/{tcid}/organizations/{orgid}/reports/compliance":{"get":{"tags":["report"],"summary":"Get MOC compliance report for an organization","description":"Get MOC compliance report for an organization","operationId":"getComplianceReport","parameters":[{"name":"tcid","in":"path","description":"The identifier for the CDP installation","required":true,"type":"string"},{"name":"orgid","in":"path","description":"The CDP identifier for the organization","required":true,"type":"string"},{"name":"test_today_date","in":"query","description":"returns the compliance report for the test date. Must be in YYYY-MM-DD format","required":false,"type":"string"},{"name":"include_inactive_assignments","in":"query","description":"whether to include report for inactive assignments","required":false,"type":"string","default":"false","enum":["true","false"]}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ComplianceReport"}},"400":{"description":"The request was called with invalid parameters"},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"organization not found"},"500":{"description":"Internal Server Error"}}}},"/tcs/{tcid}/organizations/{orgid}/reports/failures":{"get":{"tags":["report"],"summary":"Get failure report for courses in a MOC curriculum","description":"Get failure report for courses in a MOC curriculum","operationId":"getFailuresReport","parameters":[{"name":"tcid","in":"path","description":"The identifier for the CDP installation","required":true,"type":"string"},{"name":"orgid","in":"path","description":"The CDP identifier for the organization","required":true,"type":"string"},{"name":"min","in":"query","description":"only include courses that have failures more than or equal to this value","required":false,"type":"integer"},{"name":"complete","in":"query","description":"if set only course with this completion status will be returned, otherwise both completed and not completed course failures will be returned","required":false,"type":"boolean"},{"name":"manifest_id","in":"query","description":"manifest id of the course for which to look the failure report","required":false,"type":"string"},{"name":"include_inactive_assignments","in":"query","description":"whether to include report for inactive assignments","required":false,"type":"string","default":"false","enum":["true","false"]}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/FailureReports"}},"400":{"description":"The request was called with invalid parameters"},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"organization not found"},"500":{"description":"Internal Server Error"}}}},"/tcs/{tcid}/organizations/{orgid}/reports/course_schedule":{"get":{"tags":["report"],"summary":"Get users schedule course status","description":"Get users schedule course status","operationId":"getCourseSchedule","parameters":[{"name":"tcid","in":"path","description":"The identifier for the CDP installation","required":true,"type":"string"},{"name":"orgid","in":"path","description":"The CDP identifier for the organization","required":true,"type":"string"},{"name":"manifest_id","in":"query","description":"returns the course schedule report for the given manifest id","required":false,"type":"string"},{"name":"max_history_days","in":"query","description":"the max number of days for which course should be fetch, back in the history","required":false,"type":"integer","default":90},{"name":"include_inactive_assignments","in":"query","description":"whether to include report for inactive assignments","required":false,"type":"string","default":"false","enum":["true","false"]}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/CourseSchedule"}},"400":{"description":"The request was called with invalid parameters"},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"user not found"},"500":{"description":"Internal Server Error"}}}},"/reports/compliance":{"get":{"tags":["report"],"summary":"Get MOC compliance report for an organization","description":"Get MOC compliance report for an organization","operationId":"getComplianceReport","parameters":[{"name":"institution_id","in":"query","description":"returns the compliance report for the given institution id in the organization","required":false,"type":"string"},{"name":"department_id","in":"query","description":"returns the compliance report for the given department id in the organization","required":false,"type":"string"},{"name":"test_today_date","in":"query","description":"returns the compliance report for the test date. Must be in YYYY-MM-DD format","required":false,"type":"string"},{"name":"include_inactive_assignments","in":"query","description":"whether to include report for inactive assignments","required":false,"type":"string","default":"false","enum":["true","false"]}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ComplianceReport"}},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"organization not found"},"500":{"description":"Internal Server Error"}}}},"/reports/failures":{"get":{"tags":["report"],"summary":"Get failure report for courses in a MOC curriculum","description":"Get failure report for courses in a MOC curriculum","operationId":"getFailuresReport","parameters":[{"name":"institution_id","in":"query","description":"returns the failure report for the given instution id in the organization","required":false,"type":"string"},{"name":"department_id","in":"query","description":"returns the failure report for the given department id in the organization","required":false,"type":"string"},{"name":"min","in":"query","description":"only include courses that have failures more than or equal to this value","required":false,"type":"integer"},{"name":"complete","in":"query","description":"if set only course with this completion status will be returned, otherwise both completed and not completed course failures will be returned","required":false,"type":"boolean"},{"name":"manifest_id","in":"query","description":"manifest id of the course for which to look the failure report","required":false,"type":"string"},{"name":"include_inactive_assignments","in":"query","description":"whether to include report for inactive assignments","required":false,"type":"string","default":"false","enum":["true","false"]}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/FailureReports"}},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"organization not found"},"500":{"description":"Internal Server Error"}}}},"/reports/course_schedule":{"get":{"tags":["report"],"summary":"Get users schedule course status","description":"Get users schedule course status","operationId":"getCourseSchedule","parameters":[{"name":"lms_user_id","in":"query","description":"returns the course schedule report for the given user id in the organization","required":false,"type":"string"},{"name":"institution_id","in":"query","description":"returns the course schedule report for the given instution id in the organization","required":false,"type":"string"},{"name":"department_id","in":"query","description":"returns the course schedule report for the given department id in the organization","required":false,"type":"string"},{"name":"manifest_id","in":"query","description":"returns the course schedule report for the given manifest id","required":false,"type":"string"},{"name":"max_history_days","in":"query","description":"the max number of days for which course should be fetch, back in the history","required":false,"type":"integer","default":90},{"name":"include_inactive_assignments","in":"query","description":"whether to include report for inactive assignments","required":false,"type":"string","default":"false","enum":["true","false"]}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/CourseSchedule"}},"403":{"description":"The organization, that this bearer token is authorizing, was not found."},"404":{"description":"user not found"}}}}},"definitions":{"hierarchyUser":{"type":"object","required":["org_unit_id"],"properties":{"lms_user_name":{"description":"The name of the user","example":"John Doe","type":["string","null"]},"lms_user_email":{"description":"The email of the user","example":"john.doe@maildomain.com","type":["string","null"]},"active":{"description":"Whether the user is active or not","example":true,"type":"boolean"},"notify_on_start":{"description":"Whether the user should get email notification when starting a curriculum","example":true,"type":"boolean"},"notify_before_due":{"description":"Whether the user should get email notification before a due date","example":true,"type":"boolean"},"notify_past_due":{"description":"Whether the user should get email notification when overdue","example":true,"type":"boolean"},"validation_code":{"description":"The users validation code","example":"123","type":["string","null"]},"job_category_name":{"description":"The job category name of the user","example":"healthcare","type":["string","null"]},"job_title_name":{"description":"The job title name of the user","example":"Pediatric Doctor","type":["string","null"]},"lms_user_name_given":{"description":"The given lms user name of the user","example":"John D","type":["string","null"]},"lms_user_name_family":{"description":"The user name family of the user","example":"Family","type":["string","null"]},"job_category_id":{"description":"The job category id of the user","example":"1001","type":["string","null"]},"job_title_id":{"description":"The job title id of the user","example":"10010","type":["string","null"]},"org_unit_id":{"description":"The external id of the org unit associated with this user","example":"Pediatric Unit","type":"string"}}},"OrganizationHierarchy":{"type":"object","required":["external_id","descendants","label","type","deleted"],"properties":{"external_id":{"type":"string","example":"hospital-1","description":"The id of the org unit. Expected to be unique within the organization."},"label":{"type":"string","example":"Hospital One","description":"Label for the org Unit"},"type":{"type":"string","example":"hospital","description":"An arbitrary string, describing the type of the org unit"},"time_zone":{"type":["string","null"],"example":"America/Whitehorse","description":"The time zone of this org unit."},"deleted":{"type":"boolean","example":false,"description":"Whether this org unit is deleted or not"},"descendants":{"type":"array","items":{"type":"object","properties":{"OrganizationHierarchy":{"type":"object"}}}}}},"OrganizationUnit":{"type":"object","required":["deleted"],"properties":{"parent_id":{"type":"string","example":"region-of-hospital-1","description":"The external id of this org units parent."},"label":{"type":"string","example":"Hospital One","description":"Label for the org Unit"},"type":{"type":"string","example":"hospital","description":"An arbitrary string, describing the type of the org unit"},"time_zone":{"type":["string","null"],"example":"America/Whitehorse","description":"The time zone of this org unit."},"deleted":{"type":"boolean","example":false,"description":"Whether this org unit is deleted or not"}}},"UserComplianceHistoryEvent":{"type":"object","additionalProperties":false,"required":["date_of_action","new_expiration_date","source_id","source_type","course_name","action"],"properties":{"date_of_action":{"type":["string","null"],"format":"date","example":"2017-01-01","description":"The date when the event occurred that caused compliance to change."},"new_expiration_date":{"type":["string","null"],"format":"date","example":"2017-01-01","description":"The new date to which the user is compliant."},"source_id":{"type":"string","example":"cognitive","description":"The id of the course completed that caused the compliance to change"},"source_type":{"type":"string","example":"moc","description":"Type of source"},"course_name":{"type":"string","description":"Name of the course, provided we have received it from the LMS."},"action":{"type":"string","example":"create|update|advance"}}},"UserComplianceHistory":{"type":"object","additionalProperties":false,"required":["user_id","events"],"properties":{"user_id":{"type":"string","example":"17b447ab-a50f-4447-b6a1-8a4222d74a1a"},"events":{"type":"array","items":{"$ref":"#/definitions/UserComplianceHistoryEvent"}}}},"FailureReports":{"type":"array","description":"a list of failures","items":{"$ref":"#/definitions/FailureReport"}},"FailureReport":{"type":"object","additionalProperties":false,"required":["active","complete","course_id","course_start_date","failures","manifest_id","score","lms_user_id","last_failure_date","attempt_id"],"properties":{"active":{"type":"boolean","description":"whether learner's attempt is active"},"complete":{"type":"boolean","description":"completion status of the course"},"course_id":{"type":"string","description":"id of course in MOC manifest"},"course_start_date":{"type":"string","description":"start date of the course"},"failures":{"type":"integer","description":"number of times learner failed the course"},"manifest_id":{"type":"string","description":"manifest id of the MOC curriculum"},"score":{"type":"number","description":"score of the course. Value is between 0 and 1"},"lms_user_id":{"type":"string","description":"User's id in LMS"},"last_failure_date":{"type":"string","description":"the last date on which the user failed the course if any"},"attempt_id":{"type":"string","example":"03C0423E-F36B-1410-8003-800000000000","description":"the unique identifier for this curriculum attempt"},"institution_id":{"type":"string","description":"the lms id of learner's institution"},"department_id":{"type":"string","description":"the lms id of learner's department"}}},"Course":{"type":"object","properties":{"course_id":{"type":"string","example":"baseline","description":"the id of this course"},"course_name":{"type":"string","example":"Baseline Adult and Infant","description":"the name of this course"},"start_date":{"type":"string","example":"2018-03-31","description":"the start date for this course"},"due_date":{"type":"string","example":"2018-03-31","description":"the due date for this course"},"status":{"type":"string","enum":["completed","past_due_started","past_due_not_started","locked_by_past_due","started","not_started","locked_by_dependencies","upcoming"],"description":"the status for this course"}}},"PastCourse":{"type":"object","properties":{"course_id":{"type":"string","example":"baseline","description":"the id of this course"},"course_name":{"type":"string","example":"Baseline Adult and Infant","description":"the name of this course"},"start_date":{"type":"string","example":"2018-03-31","description":"the start date for this course"},"due_date":{"type":"string","example":"2018-03-31","description":"the due date for this course"},"completed_date":{"type":"string","example":"2018-03-31","description":"the completion date for this course"},"status":{"type":"string","enum":["completed","past_due_started","past_due_not_started","locked_by_past_due","started","not_started","locked_by_dependencies","upcoming"],"description":"the status for this course"}}},"Curriculum":{"type":"object","additionalProperties":false,"required":["manifest_id","title","compliant_until","ecard_valid_until","all_courses_completed","attempt_id","active","first_attempt_date","compliance_status","current_courses","future_courses","past_courses"],"properties":{"manifest_id":{"type":"string","description":"manifest id of this curriculum"},"title":{"type":"string","description":"the title of this curriculum"},"compliant_until":{"type":["string","null"],"example":"2019-03-31","description":"the compliant until date for this curriculum"},"ecard_valid_until":{"type":["string","null"],"example":"2019-03-31","description":"the ecard valid until date"},"ecard_last_renewal_date":{"type":"string","example":"2018-03-31","description":"the date last time the ecard was renewed"},"all_courses_completed":{"type":"boolean","description":"whether all the courses in this curriculum are completed"},"attempt_id":{"type":"string","example":"03C0423E-F36B-1410-8003-800000000000","description":"the unique identifier for this curriculum attempt"},"active":{"type":"boolean","description":"whether the curriculum is active for this organization or not"},"first_attempt_date":{"type":"string","example":"2018-03-31","description":"the first date this curriculum has been attempted"},"last_compliant_until":{"type":"string","example":"2018-03-31","description":"the date to when the user is compliant to this curriculum"},"compliance_status":{"type":"string","enum":["compliant","interim","uncompliant"],"description":"whether this user is compliant to this curriculum"},"current_courses":{"type":"array","description":"a list of courses currently available for the user","items":{"$ref":"#/definitions/Course"}},"future_courses":{"type":"array","description":"a list of courses that will be available for the user in the future","items":{"$ref":"#/definitions/Course"}},"past_courses":{"type":"array","description":"a list of courses that the user has already passed","items":{"$ref":"#/definitions/PastCourse"}}}},"ScheduleUser":{"type":"object","additionalProperties":false,"properties":{"lms_user_id":{"type":"string","description":"the unique identifier for this user within this organization"},"user_id":{"type":"string","example":"04C0423E-F36B-1410-8003-800000000000","description":"the unique identifier for this"},"full_name":{"type":"string","example":"John Doe","description":"the full name for this user"},"email":{"type":"string","example":"john@doe.org","description":"the email for this user"},"user_active":{"type":"boolean","description":"whether the user is active or not"},"curriculums":{"type":"array","description":"a list of all the curriculums assigned to this user","items":{"$ref":"#/definitions/Curriculum"}}}},"CourseSchedule":{"type":"object","additionalProperties":false,"properties":{"organization_id":{"type":"string","description":"the lms organization id for all the user"},"organization_timezone":{"type":"string","description":"time zone of learner's organization"},"users":{"type":"array","description":"a list of users schedule within this organization","items":{"$ref":"#/definitions/ScheduleUser"}}}},"ComplianceReport":{"type":"object","additionalProperties":false,"properties":{"curricula":{"type":"array","additionalProperties":false,"items":{"required":["manifest_id","manifest_name","active_learners_count","inactive_learners_count","incompliant_learners_count","interim_learners_count"],"properties":{"manifest_id":{"type":"string","description":"manifest id of the curriculum"},"manifest_name":{"type":"string","description":"name of the curriculum defined in the manifest"},"active_learners_count":{"type":"integer","description":"number of active learners"},"inactive_learners_count":{"type":"integer","description":"number of inactive learners"},"incompliant_learners_count":{"type":"integer","description":"number of incompliant learners"},"interim_learners_count":{"type":"integer","description":"number of interim learners"}}}},"assignments":{"type":"array","additionalProperties":false,"items":{"required":["assignment_id","resource_link_id","manifest_id","manifest_name","organization_id","organization_timezone","user_id","active","moc_active","user_active","compliant_until","ecard_until","compliance_status","ecard_status"],"properties":{"assignment_id":{"type":"string","description":"id of the launch"},"resource_link_id":{"type":"string","description":"assignment id in the LMS"},"manifest_id":{"type":"string","description":"id of the manifest"},"manifest_name":{"type":"string","description":"name of the curriculum defined in the manifest"},"organization_id":{"type":"string","description":"the lms id of the organization"},"organization_name":{"type":"string","description":"name of learner's organization"},"organization_timezone":{"type":"string","description":"time zone of learner's organization"},"institution_id":{"type":"string","description":"the lms id of learner's institution"},"institution_name":{"type":"string","description":"name of learner's institution"},"department_id":{"type":"string","description":"the lms id of learner's department"},"department_name":{"type":"string","description":"name of learner's department"},"user_id":{"type":"string","description":"id of learner in CS"},"lms_user_id":{"type":"string","description":"id of learner provided by LMS"},"lms_user_name":{"type":"string","description":"name of learner provided by LMS"},"lms_user_email":{"type":"string","description":"email of learner provided by LMS"},"roles":{"type":"string","description":"comma separated values of roles associated with the launch"},"active":{"type":"boolean","description":"whether learner's attempt is active"},"moc_active":{"type":"boolean","description":"whether curriculum for the organization is active"},"user_active":{"type":"boolean","description":"whether learner is active"},"compliant_until":{"type":["string","null"],"description":"date until when learner is compliant"},"ecard_until":{"type":["string","null"],"description":"date until when learner's ecard is valid"},"last_completion":{"type":["string","null"],"description":"last activity date that made learner compliant"},"compliance_status":{"type":"boolean","description":"whether learner is compliant or not"},"ecard_status":{"type":"boolean","description":"whether ecard is valid or not"}}}}}},"ErrorMessage":{"type":"object","required":["request_id","code","reason"],"properties":{"request_id":{"type":"string","description":"id for the request made"},"code":{"type":"string","description":"codes that can provide further detail on error","enum":["Unauthorized","NotFoundError","InvalidInput","InternalServerError"]},"reason":{"type":"string","description":"Message describing the error"},"context":{"type":"object","description":"Includes other properties that may further improve error message"}}},"LtiLaunch":{"type":"object","required":["oauth_consumer_key","lis_result_sourcedid","lis_outcome_service_url","user_id","resource_link_id","context_id","tool_consumer_instance_guid","tool_consumer_info_product_family_code","oauth_timestamp","oauth_nonce"],"properties":{"context_id":{"type":"string","description":"id of the context to which assignment belongs"},"custom_organization_id":{"type":"string","description":"id of learner's organization. Not to be set if custom_org_unit_id is set."},"custom_organization_name":{"type":"string","description":"name of learner's organization"},"custom_lis_person_timezone":{"type":"string","description":"time zone of learner's organization"},"custom_institution_id":{"type":"string","description":"id of learner's institution. Not to be set if custom_org_unit_id is set."},"custom_institution_name":{"type":"string","description":"name of learner's institution"},"custom_department_id":{"type":"string","description":"id of learner's department. Not to be set if custom_org_unit_id is set."},"custom_org_unit_id":{"type":"string","description":"the organizational unit this learner belongs to, cannot be used with other institution / department ids. It is assumed that the underlying org_unit already exists on the content service. If it does not, an error will be returned."},"custom_department_name":{"type":"string","description":"name of learner's department"},"custom_job_category_id":{"type":"string","description":"id of learner's job category"},"custom_job_category":{"type":"string","description":"learner's job category. This is old field and will be removed at some point. Instead job_category_id and job_category_name should be used"},"custom_job_category_name":{"type":"string","description":"name of learner's job category"},"custom_job_title_id":{"type":"string","description":"id of learner's job title"},"custom_job_title":{"type":"string","description":"id of learner's job title. This is old field and will be removed at some point. Instead job_title_id and job_title_name should be used"},"custom_job_title_name":{"type":"string","description":"name of learner's job title"},"custom_assignment_name":{"type":"string","description":"name of the assignment as it appears in TC"},"custom_return_format":{"type":"string","enum":["JSON"],"description":"If passed the launch data will will be returned in JSON format else MOC GUI will be presented "},"complete_on_advance":{"type":"number","enum":[0,1],"description":"tells whether to send completion LIS message to TC on compliance update."},"launch_presentation_return_url":{"type":"string","description":"url in TC where TP can redirect"},"lis_result_sourcedid":{"type":"string","description":"this identifies a unique row and column within the TC gradebook"},"lis_outcome_service_url":{"type":"string","description":"this is the endpoint in TC which can be contacted by TP"},"user_id":{"type":"string","description":"user id of the learner in TC"},"lis_person_name_full":{"type":"string","description":"given name of learner"},"lis_person_name_given":{"type":"string","description":"family name of learner"},"lis_person_name_family":{"type":"string","description":"full name of learner"},"lis_person_contact_email_primary":{"type":"string","description":"email of learner"},"oauth_consumer_key":{"type":"string","description":"Consumer key needed for signing the launch. It is in format of organization_id|license_key"},"oauth_signature":{"type":"string","description":"signature of the request"},"oauth_nonce":{"type":"string","description":"nonce of the request"},"oauth_timestamp":{"type":"string","description":"timestamp of the request"},"resource_link_id":{"type":"string","description":"assignment id"},"roles":{"type":"string","description":"comma separated values of roles assigned to learner"},"role_scope_mentor":{"type":"string","description":"comma separated ids of learners on whose behalf assignment was launched"},"tool_consumer_instance_guid":{"type":"string","description":"id that identifies TC"},"tool_consumer_info_product_family_code":{"type":"string","description":"code for TC"}}},"LtiLaunchResponse":{"type":"object","properties":{"attemptDate":{"type":"string","description":"first date of the launch"},"attemptId":{"type":"string","description":"unique identifier for the launch"},"certificateUrl":{"type":"string","description":"url to get the certificate"},"compliance":{"type":"object","properties":{"complianceStatus":{"type":"string","enum":["interim","compliant","uncompliant"],"description":"compliance status"},"compliantOffset":{"type":"string","description":"number of months to be added to compliant until date for the ecard"},"compliantUntilDate":{"type":"string","description":"date until when learner is compliant"},"lastCompliantUntilDate":{"type":"string","description":"last date until when learner was compliant"},"lastComplianceUpdateDate":{"type":"string","description":"date when compliance date advanced"},"certificateKey":{"type":"string","description":"key for the claimed certificate. If not present, certificate has not been claimed yet"}}},"courses":{"type":"object","properties":{"current":{"type":"array","items":{"$ref":"#/definitions/LtiLaunchResponseCourse"}},"future":{"type":"array","items":{"$ref":"#/definitions/LtiLaunchResponseCourse"}},"past":{"type":"array","items":{"$ref":"#/definitions/LtiLaunchResponseCourse"}}}},"currentCycle":{"type":"number","description":"denotes the current cycle"},"manifest":{"type":"object","properties":{"id":{"type":"string","description":"id of the manifest"},"title":{"type":"string","description":"title of the manifest"},"url":{"type":"string","description":"url from where manifest is located"}}},"testParams":{"type":"object","properties":{"manifest":{"type":"string","description":"manifest id of the launched curriculum"},"launch_as":{"type":"string","description":"whether course was launched as Administrator or Learner"},"test_today_date":{"type":"string","description":"date for testing."}}},"user":{"type":"object","properties":{"id":{"type":"string","description":"id of the learner"},"lmsUserId":{"type":"string","description":"learner id provided by TC"},"name":{"type":"string","description":"name of learner"},"fullName":{"type":"string","description":"full name of learner"},"email":{"type":"string","description":"email of learner"},"emailValidated":{"type":"boolean","description":"if learner email is validated or not"},"orgName":{"type":"string","description":"name of learner's organization"},"orgTimeZone":{"type":"string","description":"time zone of learner's organization"},"institutionName":{"type":"string","description":"name of learne's institution"},"emailPref":{"type":"object","properties":{"onStart":{"type":"number","description":"learner is to be notified when course becomes available"},"beforeDue":{"type":"number","description":"learner is to be notified when an incomplete course is about to approach due date"},"pastDue":{"type":"number","description":"learner is to be notified when an incomplete course is past due date"}}}}}}},"LtiLaunchResponseCourse":{"type":"object","properties":{"id":{"type":"string","description":"manifest id of course"},"title":{"type":"string","description":"title of course"},"launch":{"type":"object","description":"Use following values for LTI parameters for the course launch","properties":{"lti_link":{"type":"string","description":"launch url for course"},"oauth_consumer_key":{"type":"string"},"oauth_consumer_secret":{"type":"string"},"resource_link_id":{"type":"string"},"context_id":{"type":"string"},"tool_consumer_info_product_family_code":{"type":"string"},"tool_consumer_instance_guid":{"type":"string"},"lis_result_sourcedid":{"type":"string"},"lis_outcome_service_url":{"type":"string"},"custom_start_date":{"type":"string"},"custom_due_date":{"type":"string"}}},"locked":{"type":"boolean","description":"if course is cannot be launched because of it's dependencies are not met"},"depends_on":{"type":"array","items":{"type":"string","description":"ids of the courses that should be completed before this course can be launched"}},"start_dates":{"type":"array","items":{"type":"number","description":"start months of the coruse. Ex. if course is launched in January and value of this property is 0 and 3, then course starts in January and another instance will start on April"}},"due_period":{"type":"number","description":"duration of course in months"},"instance":{"type":"string","description":"current instance of course."},"startDate":{"type":"string","description":"start date of course"},"instanceStartPeriod":{},"dueDate":{"type":"string","description":"due date of course"},"dueDaysLeft":{"type":"string","description":"days left until due date"},"status":{"type":"string","description":"status of the course","enum":["completed","pastDueStarted","pastDueNotStarted","lockedByPastDue","started","notStarted","lockedByDependencies","upcoming"]},"canLaunch":{"type":"boolean","description":"whether course can be launched or not"},"allCourseMapIndex":{"type":"number"},"progress":{"type":"object","properties":{"attemptId":{"type":"string","description":"attempt id of the curriculum"},"courseId":{"type":"string","description":"id of the course in the curriculum"},"startDate":{"type":"string","description":"start date of the course"},"dueDate":{"type":"string","description":"due date of the course"},"completedDate":{"type":"string","description":"date at which learner completed the course"},"startedDate":{"type":"string","description":"date at which learner started the course"},"modifiedDate":{"type":"string","description":"date at which course progress was modified"}}}}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}},"customOptions":{}}