GoodMemGoodMem
ReferenceAPIREST APIAdmin

List RetrieveMemory log policies

GET /v1/admin/retrieve-memory-log-policies: Lists RetrieveMemory log policies with optional tombstone, active-time, name, label, sort, and pagination filters.

GET
/v1/admin/retrieve-memory-log-policies

Lists RetrieveMemory log policies with optional tombstone, active-time, name, label, sort, and pagination filters.

LABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).

Authorization

ApiKeyAuth
headerx-api-key<token>

Query Parameters

includeDeleted?boolean

Whether to include tombstoned policies. Also accepts include_deleted.

Defaultfalse
nameFilter?string

Case-insensitive substring filter on policy display names. Also accepts name_filter.

activeAt?integer

Only return policies active at this millisecond epoch timestamp. Also accepts active_at.

Formatint64
maxResults?integer

Maximum number of policies to return. Also accepts max_results.

Formatint32
Default50
nextToken?string

Opaque pagination token returned by the previous list response. Also accepts next_token.

sortBy?string

Sort field: created_at, updated_at, or display_name. Also accepts sort_by.

Default"created_at"
Value in"created_at""updated_at""display_name"
sortOrder?string

Sort order. Also accepts sort_order.

Default"DESCENDING"
Value in"ASCENDING""DESCENDING""SORT_ORDER_UNSPECIFIED"
label?

Filter by label key-value pairs. Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).

Example
{  "environment": "production",  "team": "nlp"}

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Response Body

Policy page

application/json
  1. response

REST response containing a page of RetrieveMemory log policies.

policies*array<>

Policy page.

nextToken?|

Opaque token for the next page.

Example"eyJvZmZzZXQiOjIwLCJhY3RpdmVBdCI6MjIxOTQ0MzIwMDAwMH0"
Example Request
curl -X GET 'https://your-goodmem-server.example.com/v1/admin/retrieve-memory-log-policies?includeDeleted=false&nameFilter=audit&activeAt=2219486400000&maxResults=20&nextToken=eyJvZmZzZXQiOjIwLCJhY3RpdmVBdCI6MjIxOTQ0MzIwMDAwMH0&sortBy=display_name&sortOrder=ASCENDING' \  -H 'GoodMem-Timeout-Ms: 30000'
Example Response
{  "policies": [    {      "policyId": "40000000-0000-4000-8000-000000000301",      "displayName": "Security audit policy",      "description": "Capture security-sensitive retrievals.",      "condition": {        "matchAll": false,        "anyOf": [          {            "spaceIds": [              "30000000-0000-4000-8000-000000000301"            ],            "spaceLabelSelectors": {              "env": "prod"            }          }        ]      },      "activeFrom": 2219443200000,      "activeUntil": 2219529600000,      "currentlyActive": true,      "deletedAt": 2219533200000,      "deletedById": "10000000-0000-4000-8000-000000000301",      "deleteReason": "Replaced by narrower policy.",      "createdAt": 2219443200000,      "updatedAt": 2219443200000,      "createdById": "10000000-0000-4000-8000-000000000301",      "updatedById": "10000000-0000-4000-8000-000000000301"    }  ],  "nextToken": "eyJvZmZzZXQiOjIwLCJhY3RpdmVBdCI6MjIxOTQ0MzIwMDAwMH0"}