- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class Relations
::nx::EnsembleObject create ::canvas::API::slot::__account
Methods (to be applied on the object)
admins (scripted)
# # Get a paginated list of the admins in the account. # # Details: https://canvas.instructure.com/doc/api/admins.html # # @param page Return the nth page of the result set # @param per_page Return this number of entries per page # @param max_entries perform potentially multiple requests # until the requested number of entries can be returned. # set r [:request -method GET -token ${:token} -url /accounts/${account_id}/admins] return [:paginated_result_list -max_entries $max_entries $r 200]
courses (scripted)
# # Retrieve a paginated list of courses in this account. # # Details: https://canvas.instructure.com/doc/api/accounts.html # # @param with_enrollments If true, include only courses # with at least one enrollment. If false, include only # courses with no enrollments. If not present, do not # filter on course enrollment status. # # @param enrollment_type If set, only return courses that # have at least one user enrolled in the course with # one of the specified enrollment types. Allowed values: # teacher, student, ta, observer, designer # # @param published If true, include only published # courses. If false, exclude published courses. If not # present, do not filter on published status. # # @param completed If true, include only completed courses # (these may be in state 'completed', or their enrollment # term may have ended). If false, exclude completed # courses. If not present, do not filter on completed # status. # # @param blueprint If true, include only blueprint # courses. If false, exclude them. If not present, do not # filter on this basis. # # @param blueprint_associated If true, include only # courses that inherit content from a blueprint course. If # false, exclude them. If not present, do not filter on # this basis. # # @param by_teachers List of User IDs of teachers; if # supplied, include only courses taught by one of the # referenced users. # # @param by_subaccounts List of Account IDs; if supplied, # include only courses associated with one of the # referenced subaccounts. # # @param hide_enrollmentless_courses If present, only # return courses that have at least one # enrollment. Equivalent to 'with_enrollments=true'; # retained for compatibility. # # @param state If set, only return courses that are in the # given state(s). By default, all states but “deleted” are # returned. Allowed values: created, claimed, available, # completed, deleted, all. # # @param enrollment_term_id If set, only includes courses # from the specified term. # # @param search_term If set, only includes courses # from the specified term. # # @param include List of extra values to be included. # Allowed values: syllabus_body, term, course_progress, # storage_quota_used_mb, total_students, teachers, # account_name, concluded # # @param sort The column to sort results by. Allowed # values: course_name, sis_course_id, teacher, # account_name # # @param order the order to sort the given column # by. Allowed values: asc, desc # # @param search_by The filter to search by. “course” # searches for course names, course codes, and SIS # IDs. “teacher” searches for teacher names Allowed # values: course, teacher # # @param starts_before If set, only return courses that # start before the value (inclusive) or their enrollment # term starts before the value (inclusive) or both the # course's start_at and the enrollment term's start_at are # set to null. The value should be formatted as: # yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. # # @param ends_after If set, only return courses that end # after the value (inclusive) or their enrollment term # ends after the value (inclusive) or both the course's # end_at and the enrollment term's end_at are set to # null. The value should be formatted as: yyyy-mm-dd or # ISO 8601 YYYY-MM-DDTHH:MM:SSZ. # # @param homeroom If set, only return homeroom courses. # # @param page Return the nth page of the result set # @param per_page Return this number of entries per page # @param max_entries perform potentially multiple requests # until the requested number of entries can be returned. # set r [:request -method GET -token ${:token} -url /accounts/${account_id}/courses?[:params {page per_page with_enrollments enrollment_type:array published completed blueprint blueprint_associated by_teachers:array by_subaccounts:array hide_enrollmentless_courses state:array enrollment_term_id search_term include:array sort order search_by starts_before ends_after homeroom }]] return [:paginated_result_list -max_entries $max_entries $r 200]
get (scripted)
# # Retrieve information on an individual account, given by # id or sis sis_account_id. # # Details: https://canvas.instructure.com/doc/api/accounts.html set r [:request -method GET -token ${:token} -url /accounts/${account_id}] return [:expect_status_code $r 200]
list (scripted)
# # A paginated list of accounts that the current user can # view or manage. Typically, students and even teachers # will get an empty list in response, only account admins # can view the accounts that they are in. # # Details: https://canvas.instructure.com/doc/api/accounts.html # # @param page Return the nth page of the result set # @param per_page Return this number of entries per page # @param max_entries perform potentially multiple requests # until the requested number of entries can be returned. # set r [:request -method GET -token ${:token} -url /accounts?[:params {page per_page}]] return [:paginated_result_list -max_entries $max_entries $r 200]
permissions (scripted)
# # Returns permission information for the calling user and # the given account. You may use `self` as the account id # to check permissions against the domain root # account. The caller must have an account role or admin # (teacher/TA/designer) enrollment in a course in the # account. # # Details: https://canvas.instructure.com/doc/api/accounts.html set r [:request -method GET -token ${:token} -url /accounts/${account_id}/permissions?[:params {permissions:array}]] return [:expect_status_code $r 200]
settings (scripted)
# # Returns all of the settings for the specified account as # a JSON object. The caller must be an Account admin with # the manage_account_settings permission. # # Details: https://canvas.instructure.com/doc/api/accounts.html set r [:request -method GET -token ${:token} -url /accounts/${account_id}/settings] return [:expect_status_code $r 200]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables