§
SYSTEM: ONLINE
← BACK TO MODULES
User Registry API Documentation
The User Registry API provides access to the underlying Turso SQLite entity database. All endpoints are relative to the base URL detailed below. Use these specifications to build out your automated API or UI/API hybrid tests.
Base URL
http://localhost:3000/api/usersGET/api/users
Retrieve all registered subjects
Returns an array of all users currently active in the database. Required for validating state after bulk ingestion.
Bearer Token Required: `autolab-bearer-token-123`
Expected Response 200 OK
{
"data": [
{
"id": "uuid-string",
"firstName": "Subject",
"lastName": "Zero",
"email": "sub0@autolab.io",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]
}POST/api/users
Register a new test subject
Creates a new user entity in the database. Will fail with 409 Conflict if the email already exists.
Bearer Token Required: `autolab-bearer-token-123`
Request Payload (JSON)
{
"firstName": "string",
"lastName": "string",
"email": "string (unique)"
} Expected Response 201 Created
{
"id": "uuid-generated",
"firstName": "string",
"lastName": "string",
"email": "string"
}GET/api/users/[id]
Retrieve a specific subject by ID
Fetch the complete entity record for a single user using their generated UUID.
Bearer Token Required: `autolab-bearer-token-123`
Expected Response 200 OK
{
"data": {
"id": "uuid",
"firstName": "x",
"lastName": "y",
"email": "z",
"createdAt": "..."
}
}PUT/api/users/[id]
Update an existing subject
Perform a partial update on a user entity. Only provided fields will be modified.
Bearer Token Required: `autolab-bearer-token-123`
Request Payload (JSON)
{
"firstName": "optional",
"lastName": "optional",
"email": "optional"
} Expected Response 200 OK
{
"id": "uuid",
"firstName": "updated",
"lastName": "updated",
"email": "updated"
}DELETE/api/users/[id]
Sever subject connection
Hard deletes a user record from the database. Will cascade and delete all associated bookings.
Bearer Token Required: `autolab-bearer-token-123`
Expected Response 204 No Content
Empty body returned