Instructure Lti::IMS::NamesAndRole API

The Lti::IMS::NamesAndRole API from Instructure — 2 operation(s) for lti::ims::namesandrole.

OpenAPI Specification

instructure-lti-ims-namesandrole-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Canvas LMS LTI ExternalTool Lti::IMS::NamesAndRole API
  description: Canvas LTI 1.3 API endpoints including Dynamic Registration, IMS Names and Roles, Line Items, Data Services, and Security endpoints.
  version: 1.0.0
  contact:
    name: Instructure Support
    url: https://developerdocs.instructure.com/
    email: support@instructure.com
  license:
    name: AGPL-3.0
    url: https://github.com/instructure/canvas-lms/blob/master/LICENSE
servers:
- url: https://{canvas_domain}
  description: Canvas institution domain
  variables:
    canvas_domain:
      default: canvas.instructure.com
      description: The institution-specific Canvas domain
tags:
- name: Lti::IMS::NamesAndRole
paths:
  /api/lti/courses/{course_id}/names_and_roles:
    get:
      summary: course_index
      tags:
      - Lti::IMS::NamesAndRole
      parameters:
      - name: course_id
        in: path
        required: true
        schema:
          type: integer
        example: 880160
      - name: rlid
        in: query
        required: false
        schema:
          type: string
        example: 4301c27b219f264f9dca9566f96a4095
      - name: page
        in: query
        required: false
        schema:
          type: integer
        example: 2
      - name: pass
        in: query
        required: false
        schema:
          type: string
        example: thru
      - name: role
        in: query
        required: false
        schema:
          type: string
        example: http://purl.imsglobal.org/vocab/lis/v2/membership#Mentor
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
        example: 2
      responses:
        '200':
          description: behaves just like a 'normal' NRPS course membership lookup
          content:
            application/vnd.ims.lti-nrps.v2.membershipcontainer+json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  context:
                    type: object
                    properties:
                      id:
                        type: string
                      label:
                        type: string
                      title:
                        type: string
                    required:
                    - id
                    - label
                    - title
                  members:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        name:
                          type: string
                        picture:
                          type: string
                        given_name:
                          type: string
                        family_name:
                          type: string
                        user_id:
                          type: string
                        lti11_legacy_user_id:
                          type: string
                        roles:
                          type: array
                          items:
                            type: string
                        message:
                          type: array
                          items:
                            type: object
                            properties:
                              https://purl.imsglobal.org/spec/lti/claim/message_type:
                                type: string
                              locale:
                                type: string
                              https://purl.imsglobal.org/spec/lti/claim/custom:
                                type: object
                                properties:
                                  person_name_full:
                                    type: string
                                  person_name_display:
                                    type: string
                                  person_name_family:
                                    type: string
                                  person_name_given:
                                    type: string
                                  user_image:
                                    type: string
                                  user_id:
                                    type: integer
                                  canvas_user_id:
                                    type: integer
                                  vnd_instructure_user_uuid:
                                    type: string
                                  canvas_user_globalid:
                                    type: integer
                                  canvas_user_sissourceid:
                                    type: string
                                  person_sourced_id:
                                    type: string
                                  message_locale:
                                    type: string
                                  vnd_canvas_person_email_sis:
                                    type: string
                                  person_email_primary:
                                    type: string
                                  person_address_timezone:
                                    type: string
                                  user_username:
                                    type: string
                                  canvas_user_sisintegrationid:
                                    type: string
                                  canvas_user_loginid:
                                    type: string
                                  canvas_xapi_url:
                                    type: string
                                  caliper_url:
                                    type: string
                                  unsupported_param_1:
                                    type: string
                                  unsupported_param_2:
                                    type: string
                              https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id:
                                type: string
                              https://purl.imsglobal.org/spec/lti/claim/lti1p1:
                                type: object
                                properties:
                                  user_id:
                                    type: string
                                required:
                                - user_id
                            required:
                            - https://purl.imsglobal.org/spec/lti/claim/message_type
                            - locale
                            - https://purl.imsglobal.org/spec/lti/claim/custom
                            - https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id
                            - https://purl.imsglobal.org/spec/lti/claim/lti1p1
                        email:
                          type: string
                        lis_person_sourcedid:
                          type: string
                      required:
                      - status
                      - name
                      - picture
                      - given_name
                      - family_name
                      - user_id
                      - lti11_legacy_user_id
                      - roles
                      - message
                required:
                - id
                - context
                - members
              example:
                id: http://test.host/api/lti/courses/880213/names_and_roles?rlid=f282bbe38e6d83524012bb96e0af2f9af9590547
                context:
                  id: f282bbe38e6d83524012bb96e0af2f9af9590547
                  label: Unnamed
                  title: Unnamed Course
                members:
                - status: Active
                  name: Marta Perkins
                  picture: http://school.edu/image/url.png
                  given_name: Marta
                  family_name: Perkins
                  email: marta.perkins@school.edu
                  lis_person_sourcedid: user-1-sis-user-id-1
                  user_id: 27446e34-fd89-42f6-ae6c-bcb32bfa8b9e
                  lti11_legacy_user_id: ea1a3f1f43b49387e308f437b811af5857232c1c
                  roles:
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor
                  message:
                  - https://purl.imsglobal.org/spec/lti/claim/message_type: LtiResourceLinkRequest
                    locale: de
                    https://purl.imsglobal.org/spec/lti/claim/custom:
                      person_name_full: Marta Perkins
                      person_name_display: Marta Perkins
                      person_name_family: Perkins
                      person_name_given: Marta
                      user_image: http://school.edu/image/url.png
                      user_id: 196739
                      canvas_user_id: 196739
                      vnd_instructure_user_uuid: PeD59XLw7mJSXyDSYDdUZrZP2mFljDAQxYqdZnUX
                      canvas_user_globalid: 196739
                      canvas_user_sissourceid: user-1-sis-user-id-1
                      person_sourced_id: user-1-sis-user-id-1
                      message_locale: de
                      vnd_canvas_person_email_sis: sis@example.com
                      person_email_primary: marta.perkins@school.edu
                      person_address_timezone: Europe/Berlin
                      user_username: sis@example.com
                      canvas_user_sisintegrationid: user-1-sis-integration-id-1
                      canvas_user_loginid: sis@example.com
                      canvas_xapi_url: http://test.host/api/lti/v1/xapi/407087-196739-880184-1702618795-03e11960d048169a-3e3b02fa846a9c5cfdf8ec15c8e4ff52d490b34c
                      caliper_url: http://test.host/api/lti/v1/caliper/407087-196739-880184-1702618795-2d66bc36035c9368-0e14a40cb616910c2d888c1efe4085b3475b1a92
                      unsupported_param_1: $unsupported.param.1
                      unsupported_param_2: $unsupported.param.2
                    https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id: ea1a3f1f43b49387e308f437b811af5857232c1c
                    https://purl.imsglobal.org/spec/lti/claim/lti1p1:
                      user_id: ea1a3f1f43b49387e308f437b811af5857232c1c
                - status: Active
                  name: User
                  picture: http://localhost/images/messages/avatar-50.png
                  given_name: User
                  family_name: ''
                  user_id: a06077c2-97ad-43e3-b46e-3efa38677e55
                  lti11_legacy_user_id: 0db0a6bb6567a1305d293e9b456793167fceccbc
                  roles:
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Learner
                  message:
                  - https://purl.imsglobal.org/spec/lti/claim/message_type: LtiResourceLinkRequest
                    locale: en
                    https://purl.imsglobal.org/spec/lti/claim/custom: {}
                    https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id: 0db0a6bb6567a1305d293e9b456793167fceccbc
                    https://purl.imsglobal.org/spec/lti/claim/lti1p1:
                      user_id: 0db0a6bb6567a1305d293e9b456793167fceccbc
        '401':
          description: does not return ims mime_type
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                    required:
                    - type
                    - message
                required:
                - errors
              example:
                errors:
                  type: unauthorized
                  message: Access Token not linked to a Tool associated with this Context
        '500':
          description: returns 500 not found
          content:
            application/json:
              schema:
                type: object
                properties: {}
                required:
                - errors
                - error_report_id
              example: {}
        '404':
          description: does not return ims mime_type
          content:
            application/json:
              schema:
                type: object
                properties: {}
                required:
                - errors
              example: {}
  /api/lti/groups/{group_id}/names_and_roles:
    get:
      summary: group_index
      tags:
      - Lti::IMS::NamesAndRole
      parameters:
      - name: group_id
        in: path
        required: true
        schema:
          type: integer
        example: 716163
      - name: page
        in: query
        required: false
        schema:
          type: integer
        example: 2
      - name: pass
        in: query
        required: false
        schema:
          type: string
        example: thru
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
        example: 2
      - name: rlid
        in: query
        required: false
        schema:
          type: string
        example: 194bad1fb03db0e9e2e556629a4ca4f7
      - name: role
        in: query
        required: false
        schema:
          type: string
        example: http://purl.imsglobal.org/vocab/lis/v2/membership#Manager
      responses:
        '200':
          description: returns all group members
          content:
            application/vnd.ims.lti-nrps.v2.membershipcontainer+json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  context:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                    required:
                    - id
                    - title
                  members:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        name:
                          type: string
                        picture:
                          type: string
                        given_name:
                          type: string
                        family_name:
                          type: string
                        user_id:
                          type: string
                        lti11_legacy_user_id:
                          type: string
                        roles:
                          type: array
                          items:
                            type: string
                        message:
                          type: array
                          items:
                            type: object
                            properties:
                              https://purl.imsglobal.org/spec/lti/claim/message_type:
                                type: string
                              locale:
                                type: string
                              https://purl.imsglobal.org/spec/lti/claim/custom:
                                type: object
                                properties:
                                  baz:
                                    type: string
                                  foo:
                                    type: string
                                  person_name_full:
                                    type: string
                                  person_name_display:
                                    type: string
                                  person_name_family:
                                    type: string
                                  person_name_given:
                                    type: string
                                  user_image:
                                    type: string
                                  user_id:
                                    type: integer
                                  canvas_user_id:
                                    type: integer
                                  vnd_instructure_user_uuid:
                                    type: string
                                  canvas_user_globalid:
                                    type: integer
                                  canvas_user_sissourceid:
                                    type: string
                                  person_sourced_id:
                                    type: string
                                  message_locale:
                                    type: string
                                  vnd_canvas_person_email_sis:
                                    type: string
                                  person_email_primary:
                                    type: string
                                  person_address_timezone:
                                    type: string
                                  user_username:
                                    type: string
                                  canvas_user_sisintegrationid:
                                    type: string
                                  canvas_user_loginid:
                                    type: string
                                  canvas_xapi_url:
                                    type: string
                                  caliper_url:
                                    type: string
                                  unsupported_param_1:
                                    type: string
                                  unsupported_param_2:
                                    type: string
                                required:
                                - person_name_full
                                - person_name_display
                                - person_name_family
                                - person_name_given
                                - user_image
                                - user_id
                                - canvas_user_id
                                - vnd_instructure_user_uuid
                                - canvas_user_globalid
                                - canvas_user_sissourceid
                                - person_sourced_id
                                - message_locale
                                - vnd_canvas_person_email_sis
                                - person_email_primary
                                - person_address_timezone
                                - user_username
                                - canvas_user_sisintegrationid
                                - canvas_user_loginid
                                - canvas_xapi_url
                                - caliper_url
                                - unsupported_param_1
                                - unsupported_param_2
                              https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id:
                                type: string
                              https://purl.imsglobal.org/spec/lti/claim/lti1p1:
                                type: object
                                properties:
                                  user_id:
                                    type: string
                                required:
                                - user_id
                            required:
                            - https://purl.imsglobal.org/spec/lti/claim/message_type
                            - locale
                            - https://purl.imsglobal.org/spec/lti/claim/custom
                            - https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id
                            - https://purl.imsglobal.org/spec/lti/claim/lti1p1
                        email:
                          type: string
                        lis_person_sourcedid:
                          type: string
                      required:
                      - status
                      - name
                      - picture
                      - given_name
                      - family_name
                      - user_id
                      - lti11_legacy_user_id
                      - roles
                      - message
                      - email
                      - lis_person_sourcedid
                required:
                - id
                - context
                - members
              example:
                id: http://test.host/api/lti/groups/716159/names_and_roles?pass=thru&role=http%3A%2F%2Fpurl.imsglobal.org%2Fvocab%2Flis%2Fv2%2Fmembership%23Member
                context:
                  id: 43849229e5c886f6aafc5bb36fe4c3b33cb3df17
                  title: 2xUeyCRQz6yjVTWiI2SyNtbOikAZGRX9SzfIvgrR
                members:
                - status: Active
                  name: value for name
                  picture: http://localhost/images/messages/avatar-50.png
                  given_name: value for
                  family_name: name
                  user_id: dfd1f6b6-887d-421a-85bb-f553a6922dbc
                  lti11_legacy_user_id: 245a4bb33da4baab24fa34772e633c9bd4b7177f
                  roles:
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Member
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Manager
                - status: Active
                  name: Marta Perkins
                  picture: http://localhost/images/messages/avatar-50.png
                  given_name: Marta
                  family_name: Perkins
                  user_id: 48f6ef9f-8dfb-42ca-9fd4-6bd23b6c0a07
                  lti11_legacy_user_id: 6d12dd551c852cb1b5039130b4faa255c8cce75d
                  roles:
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Member
                  message:
                  - https://purl.imsglobal.org/spec/lti/claim/message_type: LtiResourceLinkRequest
                    locale: en
                    https://purl.imsglobal.org/spec/lti/claim/custom: {}
                    https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id: 6d12dd551c852cb1b5039130b4faa255c8cce75d
                    https://purl.imsglobal.org/spec/lti/claim/lti1p1:
                      user_id: 6d12dd551c852cb1b5039130b4faa255c8cce75d
                - status: Active
                  name: User
                  picture: http://localhost/images/messages/avatar-50.png
                  given_name: User
                  family_name: ''
                  user_id: 46402316-6175-41d3-9022-d2dffd5f9042
                  lti11_legacy_user_id: d5bca1b80d33ba6599feb3138ec119454f9dd597
                  roles:
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Member
                  - http://purl.imsglobal.org/vocab/lis/v2/membership#Manager
                  message:
                  - https://purl.imsglobal.org/spec/lti/claim/message_type: LtiResourceLinkRequest
                    locale: en
                    https://purl.imsglobal.org/spec/lti/claim/custom: {}
                    https://purl.imsglobal.org/spec/lti/claim/lti11_legacy_user_id: d5bca1b80d33ba6599feb3138ec119454f9dd597
                    https://purl.imsglobal.org/spec/lti/claim/lti1p1:
                      user_id: d5bca1b80d33ba6599feb3138ec119454f9dd597
        '401':
          description: returns 401 unauthorized and complains about missing assertions
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                    required:
                    - type
                    - message
                required:
                - errors
              example:
                errors:
                  type: unauthorized
                  message: 'Invalid access token field/s: the following assertions are missing: sub,aud,exp,iat,jti,iss'
        '400':
          description: returns a 400 bad_request and descriptive error message
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                    required:
                    - type
                    - message
                required:
                - errors
              example:
                errors:
                  type: bad_request
                  message: Invalid 'rlid' parameter
        '500':
          description: returns 500 not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        error_code:
                          type: string
                      required:
                      - message
                      - error_code
                  error_report_id:
                    type: integer
                required:
                - errors
                - error_report_id
              example:
                errors:
                - message: An error occurred.
                  error_code: internal_server_error
                error_report_id: 127858
        '404':
          description: returns 404 not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                      required:
                      - message
                required:
                - errors
              example: {}
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication
      flows:
        authorizationCode:
          authorizationUrl: https://{canvas_domain}/login/oauth2/auth
          tokenUrl: https://{canvas_domain}/login/oauth2/token
          scopes: {}
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token (access token)