GET /v1/tests returns the test catalogue available to the current company: system tests and company-owned tests. Integrated synthetic SCORM/CMI5/xAPI tests are not included.
Endpoint
| Method | URL |
|---|---|
| GET | https://smartway.pro/api/v1/tests |
Purpose
Retrieve the list of tests that can be used for candidate or employee testing.
Prerequisites
| Requirement | Value |
|---|---|
| Authorisation | Authorization: Bearer <access_token> |
| Scope | tests.read |
| Tenant context | Resolved by the server from the Bearer token |
idCompany |
Not sent by the external client |
Request
No parameters are sent.
curl example
curl -X GET 'https://smartway.pro/api/v1/tests' \
-H 'Authorization: Bearer <access_token>' \
-H 'Accept: application/json'
Response
Successful response: 200 OK.
{
"data": [
{
"testId": 5,
"name": "Conflict Test",
"active": true,
"companyOwned": false,
"questionCount": 30
},
{
"testId": 200001,
"name": "Adaptive Sales",
"active": true,
"companyOwned": true,
"questionCount": 12
}
],
"meta": {
"total": 2
}
}
Response fields
| Field | Type | Description |
|---|---|---|
data |
object[] | List of tests available to the current company |
data[].testId |
int64 | Test ID |
data[].name |
string | Test name |
data[].active |
boolean | Test activity flag |
data[].companyOwned |
boolean | true if the test belongs to the current company |
data[].questionCount |
int32 | Number of questions in the test |
meta.total |
int32 | Total number of tests in the response |
Business logic
-
The company is resolved from the Bearer token.
-
The response includes system tests and tests owned by the current company.
-
The
companyOwnedfield indicates whether the test belongs to the current company.
Edge cases
| Scenario | API behaviour |
|---|---|
| The test is an integrated synthetic SCORM/CMI5/xAPI test | The test is not included in the catalogue |
| The token has no company context | The API returns 403 Forbidden |
Errors
| HTTP status | Reason |
|---|---|
| 401 Unauthorized | Bearer token is missing or invalid |
| 403 Forbidden | Insufficient permissions or token without company context |
| 500 Internal Server Error | Unexpected LMS Smart Way error |
| 503 Service Unavailable | LMS Smart Way internal integration failure |
Usage
Use this endpoint to obtain available testId values before creating invitations or configuring report filters.
Common mistakes
| Mistake | How to avoid it |
|---|---|
Using a token without tests.read |
Check the API key scope |
Sending idCompany in the request |
Do not send idCompany; the company is resolved from the token |
| Expecting SCORM/CMI5/xAPI synthetic tests in the catalogue | This endpoint does not return those tests |
FAQ
Do I need to send idCompany?
No. The company is resolved by the server from the Bearer token.
Are SCORM/CMI5/xAPI synthetic tests included?
No. They are not included in the GET /v1/tests catalogue.