Audit Logs
Function-calling namespace: auditLogs
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/audit-logs/create
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
userId | string | Yes |
action | string | Yes |
resourceType | string | Yes |
resourceId | string | Yes |
details | string | No |
ipAddress | string | No |
userAgent | string | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "create",
"data": {
"organizationId": "org_123",
"userId": "user_123",
"action": "value",
"resourceType": "GENERAL",
"resourceId": "resource_123"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/audit-logs/delete
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/audit-logs/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/audit-logs/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | int | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByResource
Source: backend/endpoints/audit-logs/list-by-resource
Input Fields
| Field | Type | Required |
|---|---|---|
resourceType | string | Yes |
resourceId | string | Yes |
page | int | No |
pageSize | int | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "listByResource",
"data": {
"resourceType": "GENERAL",
"resourceId": "resource_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByUser
Source: backend/endpoints/audit-logs/list-by-user
Input Fields
| Field | Type | Required |
|---|---|---|
userId | string | Yes |
page | int | No |
pageSize | int | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "listByUser",
"data": {
"userId": "user_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/audit-logs/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
userId | *string | No |
action | *string | No |
resourceType | *string | No |
resourceId | *string | No |
details | *string | No |
ipAddress | *string | No |
userAgent | *string | No |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "auditLogs",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }