Scenarios
List scenarios
Lists the organization’s role-play scenarios, most relevant first.
GET
https://dash.trainertwin.com/api/v1
/
scenarios
List scenarios
curl --request GET \
--url https://dash.trainertwin.com/api/v1/scenarios \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/scenarios', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/scenarios"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"scenarios": [
{
"slug": "react-mock-interview",
"name": "React mock interview",
"version": 3,
"visibility": "public",
"domainSlug": "frontend-engineering",
"order": 0,
"assignmentCount": 12,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"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
Maximum number of records to return.
Required range:
1 <= x <= 100Number of records to skip.
Required range:
x >= 0⌘I
List scenarios
curl --request GET \
--url https://dash.trainertwin.com/api/v1/scenarios \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/scenarios', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/scenarios"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"scenarios": [
{
"slug": "react-mock-interview",
"name": "React mock interview",
"version": 3,
"visibility": "public",
"domainSlug": "frontend-engineering",
"order": 0,
"assignmentCount": 12,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 124
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}