DevZero Logo
DevZero

Get Audit Logs

POST
/v2/teams/{team_id}/audit-logs
/v2/teams/{team_id}/audit-logs

Request Body

application/jsonOptional

audit logs filters

afterTimestring

= this time; RFC3339 format: 2006-01-02T15:04:05Z07:00

beforeTimestring

<= this time; RFC3339 format: 2006-01-02T15:04:05Z07:00

operationsarray<string>

filter by devzero operations

resourcesarray<string>

filter by devzero resources

userEmailsarray<string>

filter by user emails

Path Parameters

team_id
Required
string

ID of team

Header Parameters

Authorization
Required
string

Value: "Bearer <token>"; visit the "User Settings" page in the DevZero dashboard to generate a token

Query Parameters

pageinteger

The page number to retrieve

Minimum: 1

limitinteger

The number of items to retrieve per page

Minimum: 1Maximum: 100

ascendingboolean

Sort in ascending order based on object creation timestamp

curl -X POST "https://api.devzero.io/backend/v0/v2/teams/string/audit-logs?page=1&limit=1&ascending=true" \
  -H "Authorization: string" \
  -H "Content-Type: application/json" \
  -d '{
    "afterTime": "string",
    "beforeTime": "string",
    "operations": [
      "string"
    ],
    "resources": [
      "string"
    ],
    "userEmails": [
      "string"
    ]
  }'

OK

{
  "log_entries": [
    {
      "created_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "impersonated_user_email": "string",
      "metadata": "string",
      "operation": "create",
      "originating_user_email": "string",
      "originating_user_id": "string",
      "resource_type": "workspace",
      "team_id": "string",
      "team_name": "string"
    }
  ],
  "total_num_docs": 0
}