---
title: "POST /authorize_query"
method: POST
path: "/authorize_query"
tags: ["Local Check API"]
---

# POST /authorize_query

`POST /authorize_query`

Fetches a query that can be run against your database to determine whether an actor can perform an action on a resource.

## Request body

- LocalAuthQuery
  - `query` AuthorizeQuery, required
    - `actor_type` string, required
    - `actor_id` string, required
    - `action` string, required
    - `resource_type` string, required
    - `resource_id` string, required
    - `context_facts` Fact[]
      - `predicate` string, required
      - `args` Value[], required
        - `type` string, nullable
        - `id` string, nullable
  - `data_bindings` string, required

## Response `200`

- LocalAuthResult
  - `sql` string, required

## Other responses

- `default`

---

[API](https://skmtc.net/osohq/apis/oso-cloud-http-api.md) · [All operations](https://skmtc.net/osohq/apis/oso-cloud-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/osohq/oso-cloud-http-api/versions/edaea3b218bd/schema)
