# Get member event logs

`GET /api/members/{memberId}/event-logs`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Get member event logs](https://support.gladstonesoftware.cloud/reference/members/get-member-event-logs)

## Overview

Returns the audit trail for one member: an entry for every recorded change to their record, saying which field changed, what it changed from and what it changed to. Use it to show a member's history, or to reconcile what your integration believes about a member against what the platform actually did.

Paging is **continuation-token based, not offset based**. Ask for a page, then follow `links.next` for the one after it. You cannot jump to page five, and you cannot compute an offset. The token also encodes the query it came from, so changing `limit` or `sort-by` mid-sequence invalidates it — start again without a token if you need to change either.

`links.next` is present on **every** response, including the last page. When there is no further data it degrades to the unpaged first-page URL, with no continuation token in it. Do not use its presence as "there is more"; check whether it carries a `continuation-token` parameter, or stop when `data` comes back short or empty.

Two fields in the documented response never actually appear in the body — see `statusCode` and `errorMessage` below — and `data[].userId` is never populated. Do not build on any of the three.

An unknown member returns `404`. A member with no logged events returns `200` with an empty `data` array.

## Endpoint

`GET {base_url}/api/members/{memberId}/event-logs`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `memberId` | integer (int32) | Yes | The member whose audit trail you want. The member must exist, or the call returns `404` — but note the existence check runs *after* the sort property is validated, so a bad `sort-by` masks a bad member id with a `400`. |

## Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer (int32) | No | How many entries to return in one page. Defaults to **100** if you omit it. Keep it the same for every call in a paging sequence: `links.next` carries your limit forward, and changing it invalidates the continuation token you were given. |
| `continuation-token` | string | No | The cursor for the next page, taken from the `continuation-token` parameter inside the previous response's `links.next`. Do not construct or modify it — it encodes the sort and the position, and a token from a differently sorted or differently limited query will not behave. Omit it for the first page. |
| `sort-by` | string | No | Orders the results, in the form `property:direction`. Only three properties are accepted here: `eventDateTimeUtc`, `eventId` and `eventLogId`; anything else is rejected with `400` and `Invalid sort-by property.` Direction must be exactly `asc` or `desc` — any other word, or more than one colon, is rejected with `400`. Omit the parameter and results come back by `eventLogId` ascending, which is oldest-first; for a member history you almost always want `sort-by=eventDateTimeUtc:desc`. |

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/members/{memberId}/event-logs' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `statusCode` | integer (int32) | Never appears in the response body. Read the HTTP status code instead. |
| `errorMessage` | string | Likewise never appears in the body. On a `400` or `404` the message is returned as the whole response body as plain text, not inside this field. |
| `data` | array of object | One page of audit entries for the member. Empty when the member has no events, or when you have paged past the end. Its length is at most `limit`; a short page does not by itself prove you have reached the end, but an empty one does. |
| `data[].eventLogId` | integer (int32) | The audit entry's own id, and the default sort key. It increases in the order entries were recorded, so sorting by it ascending gives you oldest-first. |
| `data[].eventDateTimeUtc` | string (date-time) | When the change happened, in UTC as the name says — do not apply a further time-zone shift. Sort on this rather than on `eventLogId` if you care about chronology rather than recording order. |
| `data[].eventId` | integer (int32) | The code for what kind of event this was, from the platform's event catalogue. Operator-independent, but the catalogue is not exposed through this endpoint — use `eventDescription` to make it human-readable. |
| `data[].eventDescription` | string | The catalogue's description of `eventId`, joined in for you, such as the text for a member login. This is descriptive of the *kind* of event, not of this particular occurrence. |
| `data[].entityChanged` | string | Which record was affected, as the platform's internal name for that kind of record. `null` for events that are not a field-level change, such as a login. |
| `data[].fieldChanged` | string | Which field on that record was changed, again as the internal field name rather than the name used in this API. `null` for events that are not a field-level change. |
| `data[].changedFrom` | string | The value before the change, rendered as text whatever its underlying type. `null` when the field had no previous value, and for events that are not field-level changes. Do not assume it parses as the type you would expect from the API — this is the platform's own textual form. |
| `data[].changedTo` | string | The value after the change, in the same textual form as `changedFrom`. `null` when the field was cleared, and for events that are not field-level changes. |
| `data[].userId` | string | Always `null`. This endpoint deliberately does not populate this field, so it cannot tell you who made the change. There is no other field in this response that does. |
| `links` | object | Paging links for this response. Always present, even on the last page and even when `data` is empty. |
| `links.next` | string | The URL for the next page. When there is more data it includes a `continuation-token` parameter and your `limit` and `sort-by`; when there is not, it degrades to `{url}?limit={limit}` with no token, which points back at the first page rather than to nothing. Check for the `continuation-token` parameter before following it, or you will loop over the first page forever. |

## Sample response

```json title="200 OK"
{
  "statusCode": 1,
  "errorMessage": "string",
  "data": [
    {
      "eventLogId": 12345,
      "eventDateTimeUtc": "2026-08-14T19:00:00Z",
      "eventId": 12345,
      "eventDescription": "string",
      "entityChanged": "string",
      "fieldChanged": "string",
      "changedFrom": "string",
      "changedTo": "string",
      "userId": "string"
    }
  ],
  "links": {
    "next": "string"
  }
}
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `sort-by` names a property other than `eventDateTimeUtc`, `eventId` or `eventLogId`. The body is the plain text `Invalid sort-by property.` This check runs before the member is looked up, so it wins over a `404`. |
| `400` | Bad request | `sort-by` is malformed — an empty property name, more than one colon, or a direction that is not exactly `asc` or `desc`. This is rejected before the property check runs, so the body is a validation error rather than the message above. |
| `404` | Not found | `memberId` does not exist. The body is the plain text `Member not found.` A member with no events returns `200` and an empty `data` array instead. |
| `500` | Internal server error | The request did not arrive through a Gladstone gateway, so `links.next` cannot be built. |
| `500` | Internal server error | An unexpected server-side failure while reading the logs, or a continuation token that cannot be interpreted for this query. |
