---
title: "Search Past Grants"
method: POST
path: "/api/v1/search/past-grants"
tags: ["App Entitlement User Binding History"]
---

# Search Past Grants

`POST /api/v1/search/past-grants`

Search historical grants that have been revoked, filtered by app user or entitlement.

## Request body

- C1ApiAppV1SearchPastGrantsRequest — The request message for searching historical grants.
  - `appEntitlementRefs` C1ApiAppV1AppEntitlementRef[], nullable — A list of entitlement references to restrict the search to.
    - `appId` string — The appId field.
    - `id` string — The id field.
  - `appIds` string[], nullable — A list of app IDs to restrict the search to.
  - `appUserRefs` C1ApiAppV1AppUserRef[], nullable — A list of app user references to restrict the search to.
    - `appId` string — The ID of the application.
    - `id` string — The ID of the app user.
  - `expandMask` C1ApiAppV1AppEntitlementUserBindingExpandHistoryMask — The AppEntitlementUserBindingExpandHistoryMask message.
    - `paths` string[], nullable — The paths field.
  - `pageSize` integer — The maximum number of results to return per page.
  - `pageToken` string — The token for fetching the next page of results.

## Response `200`

The SearchPastGrantsResponse message contains a list of past grants and a nextPageToken if applicable.

- C1ApiAppV1SearchPastGrantsResponse — The SearchPastGrantsResponse message contains a list of past grants and a nextPageToken if applicable.
  - `expanded` object[], nullable — The expanded field.
    - `@type` string — The type of the serialized message.
  - `list` C1ApiAppV1AppEntitlementUserBindingHistoryView[], nullable — The list of results containing up to X results, where X is the page size defined in the request.
    - `appPath` string — The appPath field.
    - `appUserPath` string — The appUserPath field.
    - `entitlementPath` string — The entitlementPath field.
    - `history` C1ApiAppV1AppEntitlementUserBindingHistory — The AppEntitlementUserBindingHistory message.
      - `appEntitlementId` string — The ID of the app entitlement that the app user has access to
      - `appId` string — The ID of the app associated with the app entitlement
      - `appUserId` string — The ID of the app user that has access to the app entitlement
      - `grantedAt` string, date-time
      - `revokedAt` string, date-time
  - `nextPageToken` string — The nextPageToken is shown for the next page if the number of results is larger than the max page size. The server returns one page of results and the nextPageToken until all results are retrieved. To retrieve the next page, use the same request and append a pageToken field with the value of nextPageToken shown on the previous page.

---

[API](https://skmtc.net/conductorone/apis/c1-api.md) · [All operations](https://skmtc.net/conductorone/apis/c1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/conductorone/c1-api/revisions/d391405a35d3/schema)
