POST test-tickets/…
Requests a new ticket for an anonymous test. An anonymous test is a test that is taken by a user who is not (necessarily) logged in in the Drillster platform. A ticket is used to start the test.
Resource URL
https://www.drillster.com/api/2/test-tickets/{test_id}
Parameters
Field | Type | Description |
---|---|---|
test_id required |
String | The test ID is the unique identifier for a previously defined test. |
name optional |
String | The full real name of the person taking the test. |
emailAddress optional |
String | The email address of the person taking the test. The value is optional, but if an email address is given, it must be valid. |
reference optional |
String | The requesting organization's reference for this request test instance. |
pin optional |
Boolean | Whether to return a secure test PIN code instead of a ticket. |
Response
A 2.0 TestResponse object. The URL in the response object can be used by the person taking the test to start it.
Example request
POST https://www.drillster.com/api/2/test-tickets/gVZQAV1AQTeLz8dFUkl7PA
name=John%20Doe&emailAddress=john%40example.com&reference=test023
Response
{
"url": "https://www.drillster.com/connector/player/gVZQAV1AQTeLz8dFUkl7PA?ticket=nnUauL5nSCyOaK8TJ11kcA",
"ticket": "nnUauL5nSCyOaK8TJ11kcA"
}
Error responses
The following error situations are possible:
ID | Response code | Description |
---|---|---|
missing_test_code |
400 (Bad request) | No test code specified |
unauthenticated |
401 (Unauthorized) | User does not have permission to perform this action |
not_found |
404 (Not found) | Given test code not found |
not_permitted |
401 (Unauthorized) | Caller has no access to given test definition |
invalid_email_address |
400 (Bad request) | Given email address is not valid |