gateway-policies

Search gateway policies by subject value set

Changed on

Batch variant of GET /v1/platform/gateway-policies for fetching policies that match a set of subject_matcher_values under one subject_matcher_key. Accepts the values in a JSON body so callers can include hundreds of subject ids without bumping into per-server URL-length limits.

Visibility, response shape, and matcher semantics are identical to the GET list. With subject_matcher_values empty (or omitted) this returns the same result as GET with only policy_type set.

post/api/v1/platform/gateway-policies/search

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/api/v1/platform/gateway-policies/search
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Request body

policy_typestring
subject_matcher_keystring
subject_matcher_valuesstring[]

Response

OK

actionstring
configobject
created_atstring
created_bystring
current_spend_usdnumber

CurrentSpendUSD is the spend in the policy's current window. Set for any spend_cap policy regardless of enabled state — disabled policies still surface usage so users can see what would have been counted. Nil for non-spend_cap policies or when the spend lookup failed.

descriptionstring
enabledboolean
idstring
is_system_generatedboolean
namestring
organization_idstring
parent_policy_idstring

ParentPolicyID is set on materialized children of a default_spend_cap to the default's id. An explicit Update or a Create with the same matchers clears the link and takes ownership of the materialized row. Delete on the parent cascade-soft-deletes children still attached.

policy_typestring
priorityinteger
updated_atstring

Changes