Access policies

List the project's access policies

  • Sandbox: available
  • On your own host? Choose https://{host} in the playground.
GET
/v1/access-policies

Lists the project's access policies by name, one page at a time.

Scope: the caller's project (from the token). Medplum reads them on behalf of the caller, so the caller's own rights apply.

Behaviour

  • page (from 0) and count (1–100, default 20) select the page. hasMore says whether another page follows.
  • Each rule names a resource type, *, or a Signals row such as signals_alerts. Its interaction lists what it grants, spelled out even when the stored rule says readonly. Any criteria, hiddenFields and readonlyFields are listed with it.
  • managed marks a policy that Ovok provisions, and copyOf marks a copy of a parent project's policy. Both are read-only here.

Example

curl 'https://api.sandbox.ovok.com/v1/access-policies?count=50' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Who can call it: a project admin. See roles.

Authorization

bearer
headerAuthorizationBearer <JWT>

Query Parameters

page?integer
Range0 <= value <= 10000
Default0
count?integer
Range1 <= value <= 100
Default20

Response Body

A page of policies by name.

application/json
  1. response
hasMore*boolean
policies*array<>
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v1/access-policies'
Example Response
{  "hasMore": true,  "policies": [    {      "id": "string",      "reference": "string",      "name": "string",      "versionId": "string",      "managed": true,      "copyOf": "string",      "rules": [        {          "resourceType": "string",          "interaction": [            "read"          ],          "criteria": "string",          "hiddenFields": [            "string"          ],          "readonlyFields": [            "string"          ]        }      ]    }  ]}