Scenarios
Get a scenario
Returns one scenario including its role-play configuration (data). The data payload is dashboard-controlled and may gain fields at any time.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns one scenario including its role-play configuration (data). The data payload is dashboard-controlled and may gain fields at any time.
curl --request GET \
--url https://trainertwin.com/api/v1/scenarios/{scenarioSlug} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://trainertwin.com/api/v1/scenarios/{scenarioSlug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://trainertwin.com/api/v1/scenarios/{scenarioSlug}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"scenario": {
"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",
"data": {
"objective": "Assess the candidate's React fundamentals under interview pressure."
}
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}curl --request GET \
--url https://trainertwin.com/api/v1/scenarios/{scenarioSlug} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://trainertwin.com/api/v1/scenarios/{scenarioSlug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://trainertwin.com/api/v1/scenarios/{scenarioSlug}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"scenario": {
"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",
"data": {
"objective": "Assess the candidate's React fundamentals under interview pressure."
}
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}