EndpointsAudit Logs

Audit Logs

Function-calling namespace: auditLogs

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

create

Source: backend/endpoints/audit-logs/create

Input Fields

FieldTypeRequired
organizationIdstringYes
userIdstringYes
actionstringYes
resourceTypestringYes
resourceIdstringYes
detailsstringNo
ipAddressstringNo
userAgentstringNo

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

FieldTypeRequired
idstringYes
organizationIdstringYes

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

FieldTypeRequired
idstringYes
organizationIdstringYes

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

FieldTypeRequired
organizationIdstringYes
pageintNo
pageSizeintNo

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

FieldTypeRequired
resourceTypestringYes
resourceIdstringYes
pageintNo
pageSizeintNo

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

FieldTypeRequired
userIdstringYes
pageintNo
pageSizeintNo

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

FieldTypeRequired
idstringYes
organizationIdstringYes
userId*stringNo
action*stringNo
resourceType*stringNo
resourceId*stringNo
details*stringNo
ipAddress*stringNo
userAgent*stringNo

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": {} }