diff --git a/app/controllers/lti/account_lookup_controller.rb b/app/controllers/lti/account_lookup_controller.rb index 7a2e09eefc4..4de1f08128c 100644 --- a/app/controllers/lti/account_lookup_controller.rb +++ b/app/controllers/lti/account_lookup_controller.rb @@ -16,12 +16,61 @@ # with this program. If not, see . module Lti + # @API Accounts (LTI) + # + # API for accessing account data using an LTI dev key. Allows a tool to get account + # information via LTI Advantage authorization scheme, which does not require a + # user session like normal developer keys do. Requires the account lookup scope on + # the LTI key. + # + # @model Account + # { + # "id": "Account", + # "description": "", + # "properties": { + # "id": { + # "description": "the ID of the Account object", + # "example": 2, + # "type": "integer" + # }, + # "name": { + # "description": "The display name of the account", + # "example": "Canvas Account", + # "type": "string" + # }, + # "uuid": { + # "description": "The UUID of the account", + # "example": "WvAHhY5FINzq5IyRIJybGeiXyFkG3SqHUPb7jZY5", + # "type": "string" + # }, + # "parent_account_id": { + # "description": "The account's parent ID, or null if this is the root account", + # "example": 1, + # "type": "integer" + # }, + # "root_account_id": { + # "description": "The ID of the root account, or null if this is the root account", + # "example": 1, + # "type": "integer" + # }, + # "workflow_state": { + # "description": "The state of the account. Can be 'active' or 'deleted'.", + # "example": "active", + # "type": "string" + # } + # } + # } + # class AccountLookupController < ApplicationController include Ims::Concerns::AdvantageServices include Api::V1::Account MIME_TYPE = 'application/vnd.canvas.accountlookup+json'.freeze + # @API Get account + # Retrieve information on an individual account, given by local or global ID. + # + # @returns Account def show # sending read_only=true; sending false would give more fields but passes the # nil session in to extensions' extend_account_json() which may not be safe diff --git a/config/routes.rb b/config/routes.rb index 7cf53da69bf..348ddd5a952 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2366,7 +2366,7 @@ CanvasRails::Application.routes.draw do get "assignments/:assignment_id/files/:file_id/originality_report", action: :show end - # Line Item Service + # Line Item Service (LTI AGS) scope(controller: 'lti/ims/line_items') do post "courses/:course_id/line_items", action: :create, as: :lti_line_item_create get "courses/:course_id/line_items/:id", action: :show, as: :lti_line_item_show @@ -2375,7 +2375,7 @@ CanvasRails::Application.routes.draw do delete "courses/:course_id/line_items/:id", action: :destroy, as: :lti_line_item_delete end - # Scores Service + # Scores Service (LTI AGS) scope(controller: 'lti/ims/scores') do post "courses/:course_id/line_items/:line_item_id/scores", action: :create, as: :lti_result_create end