Manage access records
Use /v1/access operations for credential records. Device opening and closing are separate /v1/device operations.
POST
/v1/access/list
List access records
Requires can_view_access_cards or can_view_guests. Role restrictions and filters determine the visible records. Results use access_cards and count.
JSON request body
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number; default 1. |
| page_limit | integer | Results per page; default 25. |
| search | string | Optional search text. |
Request Example
curl -X POST "https://your-lexoh-server.app.lexoh.com:3000/v1/access/list" \
-H "SessionID: SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"page":1,"page_limit":25}'
Response Example
Example with no matching access records.
{
"success": true,
"access_cards": [],
"count": 0
}
POST
/v1/access
Retrieve an access record
Send the numeric access-card id in the JSON body. The account must have permission to view the corresponding user, customer or guest credential.
JSON request body
| Parameter | Type | Description |
|---|---|---|
| id | integer | Access-card identifier; replace the example value. |
Request Example
curl -X POST "https://your-lexoh-server.app.lexoh.com:3000/v1/access" \
-H "SessionID: SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id":123}'
Create, update and delete credentials
- PUT /v1/access creates an access record.
- PATCH /v1/access updates an access record identified by id.
- DELETE /v1/access deletes an access record identified by id.
- Write operations require the corresponding add, edit or delete permission for access cards or guests. The record fields depend on the credential type and its linked entities.