---
title: "POST /api/rpc/querySiteChangeHistory"
method: POST
path: "/api/rpc/querySiteChangeHistory"
tags: ["sites"]
---

# POST /api/rpc/querySiteChangeHistory

`POST /api/rpc/querySiteChangeHistory`

## Request

- Base URL: `https://21risk.com`
- URL: `https://21risk.com/api/rpc/querySiteChangeHistory`
- Auth: OAuth 2 (client credentials, token URL `/api/v1/oauth/token`)

Returns site revision activity. Supply siteId for one site or omit it for every site in the organization. Revision-prefixed fields describe the saved revision; shared site fields and filters use current values.

## Request body

- object
  - `tenant` unknown, required
  - `siteId` string: ID of the site whose revision history you want to retrieve. Omit to span every site in the organization.
  - `query` string: Free-text search on the site name.
  - `name` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `country` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `city` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `region` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `district` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `postcode` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `locality` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `neighborhood` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `tags` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `insurance` string: Operands must be true or false, such as "true" or "!false". Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty.
  - `status` string: Valid operands: active, inactive. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty.
  - `groups` string: Operands must represent integer IDs, such as "1,2" or "!3". Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty.
  - `parent` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `changedBy` string: Operands must be user IDs, or @me for the signed-in user, such as "@me" or "!@me". Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `changes` string: Operands must be strings. Comma-separated values for OR, semicolon for AND. Use ! to exclude, ^ for exact match, * for any value, !* for empty. Use the facet query to discover valid values.
  - `date` string: ISO dates (2024-01-15), periods (2024, 2024-01), comparisons (>=2024, <2024-06), ranges (2024-01-01..2024-12-31), or relative dates (@today, @today-7d). Units: d, w, m, y. Use * for any date, !* for empty.
  - `createdDate` string: ISO dates (2024-01-15), periods (2024, 2024-01), comparisons (>=2024, <2024-06), ranges (2024-01-01..2024-12-31), or relative dates (@today, @today-7d). Units: d, w, m, y. Use * for any date, !* for empty.
  - `includes` integer[]: Only include records whose IDs are in this list.
  - `excludes` integer[]: Exclude records whose IDs are in this list.
  - `after` string: Cursor-based pagination: return results after this cursor. Use pageInfo.endCursor from the previous page.
  - `before` string: Cursor-based pagination: return results before this cursor. Use pageInfo.startCursor from the current/previous page.
  - `first` union
    - integer
    - 'all'
  - `last` integer: Cursor-based pagination: number of results to return before the before cursor. Use for backward pagination.
  - `sort` 'date' | 'name' | 'country' | 'address' | 'city' | 'region' | 'district' | 'postcode' | 'locality' | 'neighborhood' | 'street' | 'latitude' | 'longitude' | 'createdDate' | 'status' | 'parent' | 'changedBy' | 'revision'
  - `direction` 'asc' | 'desc'

## Response `200`

Successful response

## Other responses

- `400`: Error 400

---

[API](https://skmtc.dev/21risk/apis/21risk-api.md) · [All operations](https://skmtc.dev/21risk/apis/21risk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/21risk/apis/21risk-api/revisions/273a727dfd49?raw)
