/1/learner - GET
Overview
The /1/learner endpoint provides for the examination of already created learners.
Endpoint Details
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 |
Accept | application/json | |
Authorization | Bearer <your token> | Bearer wV1MLk5+sFzioJw/3M5r9A== |
X-UserId | <the user id> | The id of the user to view the learners for (See REST API Guide and /1/user - POST) NOTE: This value must be provided by iFrame customers and only one of X-UserId or X-UserCode should be specified. All other customers must omit this header field. |
X-UserCode | <the user code> | The code of the user to view the learners for (See REST API Guide and /1/user - POST) NOTE: This value must be provided by iFrame customers and only one of X-UserId or X-UserCode should be specified. All other customers must omit this header field. |
Query Arguments
N/A
Example
curl -X GET \
-H 'User-Agent: dmid-rest-api' \
-H 'Authorization: Bearer wV1MLk5+sFzioJw/3M5r9A==' \
-H "Accept: application/json" \
https://api-sandbox.datamtd.com/1/learner
Response
[ { "gender": 1, "color": null, "firstName": "David's", "id": 1, "code": null, "dateOfBirth": "1990-12-31T00:00:00Z", "lastName": "Learner Number1" }, { "gender": null, "color": null, "firstName": "David's", "id": 2, "code": null, "dateOfBirth": "1970-01-01T00:00:00Z", "lastName": "Learner Number2" }
]