Assignments
List assignments
GET
https://dash.trainertwin.com/api/v1
/
assignments
List assignments
curl --request GET \
--url https://dash.trainertwin.com/api/v1/assignments \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/assignments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/assignments"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"assignments": [
{
"id": "assignment_123",
"assignedAt": "2023-11-07T05:31:56Z",
"status": "pending",
"user": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com"
},
"scenario": {
"slug": "react-mock-interview",
"name": "React mock interview",
"version": 3,
"visibility": "public"
},
"practiceUrl": "<string>"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 124
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}Authorizations
Organization API key generated in Dashboard → account menu → Developer API (dash.trainertwin.com/developer).
Query Parameters
Filter by learner user ID.
Filter by published scenario slug.
Maximum number of records to return.
Required range:
1 <= x <= 100Number of records to skip.
Required range:
x >= 0⌘I
List assignments
curl --request GET \
--url https://dash.trainertwin.com/api/v1/assignments \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/assignments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/assignments"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"assignments": [
{
"id": "assignment_123",
"assignedAt": "2023-11-07T05:31:56Z",
"status": "pending",
"user": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com"
},
"scenario": {
"slug": "react-mock-interview",
"name": "React mock interview",
"version": 3,
"visibility": "public"
},
"practiceUrl": "<string>"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 124
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}