/1/authorize - DELETE

Overview

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

Description

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.


Beta API

NOTE: This API is currently in beta and applies only to the 'iFrame' API customers.



Required 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 REST API Guide and /1/learner - POST)
X-LearnerCode<the learner code>A REST-client-supplied identifier that identifies the learner (see REST API Guide and /1/learner - POST)

Request Query Fields

FieldTypeRequiredDescription
userId<the user id>OptionalThe id of the user to give permission to assess the learner (See 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 (See Getting startREST API Guideed and /1/user - POST)*

HTTP 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

Example


Example

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" \
  https://api-sandbox.datamtd.com/1/authorize?userId=1234