Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Aligned userId/userCode and X-LearnerId/X-LearnerCode with REST API Guide

Overview

The /1/authorize endpoint allows for the removal of authorizations made via /1/authorize - POST

...

When a learner is created via /1/learner - POST, it can only be assessed by the user that was provided when the learner was created.  If multiple users (created by /1/user - POST) need to perform assessments on a single learner, /1/authorize - POST can be used to authorize subsequent users to perform assessments on the learner.

...

Info
titleRequired Headers


Key
Value
Example
User-Agent<company identifier>The exact value here is not important, but it should include something to identify your company
AuthorizationBearer <your token>Bearer wV1MLk5+sFzioJw/3M5r9A==
Content-Typeapplication/json
X-LearnerId<the learner id>The DMTD-supplied identifier that identifies the learner (see Getting startedREST API Guide and /1/learner - POST)*
X-LearnerCode<the learner code>A REST-client-supplied identifier that identifies the learner (see Getting startedREST API Guide and /1/learner - POST)*
*Only one of X-LearnerId or X-LearnerCode is required. If both are specified, X-LearnerId is used.



Info
titleRequest Query Fields


FieldTypeRequiredDescription
userId<the user id>OptionalThe id of the user to give permission to assess the learner (SeeSee Getting starteREST API Guided and /1/user - POST)*
userCode<the user code>Optional

The code of the user to give permission to assess the learner (SeeSee Getting startREST API Guideed and /1/user - POST)*

*Only one of userId or userCode is required. If both are specified, userId is used.



Info
titleHTTP Status


HTTP StatusDescription
200 - OKThe call succeeded and the user no longer has permission to assess the given learner.
202 - AcceptedThe given user did not have permission to assess the given learner.
400 - Bad RequestThe body of the request was invalid
401 - UnauthorizedThe caller identified by the Bearer token does not have permission to perform this operation


...

Info
titleExample
curl -X DELETE \
-H 'User-Agent: dmtd-rest-api' \
  -H 'Authorization: Bearer L2Hth4lRwgHRBWtX8Hkl5w==' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
-H "X-LearnerId: 1" \
  -d '{ "userId": "1234" }' \
  https://api-sandbox.datamtd.com/1/authorize?userId=1234