Skip to main content
GET
/
audit-logs
List audit logs
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/audit-logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "items": [
    {
      "type": "audit-log",
      "id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
      "timestamp": "2022-01-01T00:00:00+00:00",
      "action": "created",
      "merchant_account_id": "default",
      "user": {
        "id": "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5",
        "name": "John L",
        "email_address": "john@example.com",
        "staff": false,
        "status": "active"
      },
      "resource": {
        "type": "buyer",
        "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
        "name": "Samuel J"
      }
    }
  ],
  "limit": 1,
  "next_cursor": "ZXhhbXBsZTE",
  "previous_cursor": null
}
This endpoint requires the audit-logs.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
integer<int32>
default:20

Defines the maximum number of items to return for this request.

Required range: 1 <= x <= 100
Example:

1

cursor
string<>

A cursor that identifies the page of results to return. This is used to paginate the results of this API.

For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the next_cursor field. Similarly the previous_cursor can be used to reverse backwards in the list.

Example:

"ZXhhbXBsZTE"

user_id
string

Filters the results to only the items for which the user has an id that matches this value.

Example:

"8724fd24-5489-4a5d-90fd-0604df7d3b83"

action
enum<string>

Filters the results to only the items for which the audit-log has an action that matches this value.

Available options:
created,
updated,
deleted
Example:

"created"

resource_type
string

Filters the results to only the items for which the audit-log has a resource that matches this type value.

Example:

"buyer"

Response

Returns a list of audit logs.

A list of audit log entries.

items
Audit Log · object[]

A list of audit log entries.

limit
integer<int32>
default:20

The limit applied to request. This represents the number of items that are at maximum returned by this request.

Required range: 1 <= x <= 100
Example:

1

next_cursor
string | null

The cursor that represents the next page of results. Use the cursor query parameter to fetch this page of items.

Required string length: 1 - 1000
Example:

"ZXhhbXBsZTE"

previous_cursor
string | null

The cursor that represents the next page of results. Use the cursor query parameter to fetch this page of items.

Required string length: 1 - 1000
Example:

null