Audit Logs

Get a list of audit logs

GET
/api/v1/envs/{envId}/audit-logs

Get the list of audit logs for a specific environment, with optional filtering and pagination.

Authorization

AccessToken
Authorization<token>

Use access token to access this API. Example: "Authorization: api-MzQ..."

In: header

Path Parameters

envId*string
Formatuuid

Query Parameters

Query?string

The part of the keyword/comment of an audit log

CreatorId?string

The creator id

Formatuuid
RefId?string

The referenced resource id, such as feature flag id or segment id

RefType?string

The referenced resource type. Can be one of the following: "FeatureFlag" or "Segment"

From?integer

The start time of the audit log creation time range, in unix milliseconds

Formatint64
To?integer

The end time of the audit log creation time range, in unix milliseconds

Formatint64
CrossEnvironment?boolean

Whether to query logs across environments. By default, we only query logs in the specified environment (the current environment). Only set this to true if you want to query logs for a shared-segment.

PageIndex?integer

The index of the page to be returned. Default is 0.

Formatint32
PageSize?integer

The size of the page to be returned. Default is 10.

Formatint32

Header Parameters

Organization?string

The organization ID associated with the request. Some APIs require this header to identify the organization context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Workspace?string

The workspace ID associated with the request. Some APIs require this header to identify the workspace context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Response Body

application/json

curl -X GET "https://example.com/api/v1/envs/497f6eca-6276-4993-bfeb-53cbbbba6f08/audit-logs"
{  "success": true,  "errors": [    "string"  ],  "data": {    "totalCount": 0,    "items": [      {        "id": "string",        "refId": "string",        "refType": "string",        "operation": "string",        "dataChange": {          "previous": "string",          "current": "string"        },        "comment": "string",        "creatorId": "688ebf54-d343-4104-8711-82c2feac534a",        "creatorName": "string",        "creatorEmail": "string",        "createdAt": "2019-08-24T14:15:22Z",        "instructions": [          {            "kind": "string",            "value": null          }        ]      }    ]  }}