User Observees
API for accessing information about the users a user is observing.
A PairingCode object looks like:
GET /api/v1/users/:user_id/observees
GET /api/v1/users/:user_id/observees
Scope: url:GET|/api/v1/users/:user_id/observees
A paginated list of the users that the given user is observing.
Note: all users are allowed to list their own observees. Administrators can list other users’ observees.
The returned observees will include an attribute “observation_link_root_account_ids”, a list of ids for the root accounts the observer and observee are linked on. The observer will only be able to observe in courses associated with these root accounts.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
|
Allowed values: |
Example Request:
Returns a list of User objects.
UserObserveesController#observers
GET /api/v1/users/:user_id/observers
GET /api/v1/users/:user_id/observers
Scope: url:GET|/api/v1/users/:user_id/observers
A paginated list of the observers of a given user.
Note: all users are allowed to list their own observers. Administrators can list other users’ observers.
The returned observers will include an attribute “observation_link_root_account_ids”, a list of ids for the root accounts the observer and observee are linked on. The observer will only be able to observe in courses associated with these root accounts.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
|
Allowed values: |
Example Request:
Returns a list of User objects.
UserObserveesController#create
POST /api/v1/users/:user_id/observees
POST /api/v1/users/:user_id/observees
Scope: url:POST|/api/v1/users/:user_id/observees
Register the given user to observe another user, given the observee’s credentials.
Note: all users are allowed to add their own observees, given the observee’s credentials or access token are provided. Administrators can add observees given credentials, access token or the observee’s id.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| The login id for the user to observe. Required if access_token is omitted. |
|
| The password for the user to observe. Required if access_token is omitted. |
|
| The access token for the user to observe. Required if |
|
| A generated pairing code for the user to observe. Required if the Observer pairing code feature flag is enabled |
|
| The ID for the root account to associate with the observation link. Defaults to the current domain account. If ‘all’ is specified, a link will be created for each root account associated to both the observer and observee. |
Example Request:
Returns an User object.
GET /api/v1/users/:user_id/observees/:observee_id
GET /api/v1/users/:user_id/observees/:observee_id
Scope: url:GET|/api/v1/users/:user_id/observees/:observee_id
Gets information about an observed user.
Note: all users are allowed to view their own observees.
Example Request:
Returns an User object.
UserObserveesController#show_observer
GET /api/v1/users/:user_id/observers/:observer_id
GET /api/v1/users/:user_id/observers/:observer_id
Scope: url:GET|/api/v1/users/:user_id/observers/:observer_id
Gets information about an observer.
Note: all users are allowed to view their own observers.
Example Request:
Returns an User object.
UserObserveesController#update
PUT /api/v1/users/:user_id/observees/:observee_id
PUT /api/v1/users/:user_id/observees/:observee_id
Scope: url:PUT|/api/v1/users/:user_id/observees/:observee_id
Registers a user as being observed by the given user.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| The ID for the root account to associate with the observation link. If not specified, a link will be created for each root account associated to both the observer and observee. |
Example Request:
Returns an User object.
UserObserveesController#destroy
DELETE /api/v1/users/:user_id/observees/:observee_id
DELETE /api/v1/users/:user_id/observees/:observee_id
Scope: url:DELETE|/api/v1/users/:user_id/observees/:observee_id
Unregisters a user as being observed by the given user.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| If specified, only removes the link for the given root account |
Example Request:
Returns an User object.
ObserverPairingCodesApiController#create
POST /api/v1/users/:user_id/observer_pairing_codes
POST /api/v1/users/:user_id/observer_pairing_codes
Scope: url:POST|/api/v1/users/:user_id/observer_pairing_codes
If the user is a student, will generate a code to be used with self registration or observees APIs to link another user to this student.
Returns a PairingCode object.
© Instructure, Inc. Generated on Wed Nov 6 14:20:09 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated