Access policies

Get access policy

Get access policy using Ovok’s Slim API.

MethodPath
GET/v1/slim/policy/:id

Authentication · Access policies

Returns one access policy (role) with the practitioners who hold it.

Auth: Bearer token for a practitioner, project admin or System Owner session. The caller's access policy must grant Practitioner:create, the right to invite users (project admins skip this check). Scope: The policy must belong to the caller's project (from the token), its parent project or one of its direct child projects.

Request

Path parameters

NameTypeRequiredDescription
idstring (uuid)YesAccess policy id.

Behaviour

  • Read-only.
  • Returns { policy, members }. policy is the full AccessPolicy. members lists the Practitioner members whose membership points to it, as { reference, display }.
  • A policy that exists in a project outside your scope answers 403. An id that matches no policy answers 404.
  • members lists only memberships whose accessPolicy is this policy. A membership that reaches the policy only through an access entry is not listed.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/policy/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
  -H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response

200 — Access policy retrieved successfully.

{
  "policy": {
    "resourceType": "AccessPolicy",
    "id": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21",
    "name": "Night shift",
    "resource": [
      { "resourceType": "Patient", "interaction": ["read", "search", "update"] },
      { "resourceType": "Device", "interaction": ["read", "search"], "readonly": true },
      { "resourceType": "Consent", "interaction": ["read", "search", "create", "update"] }
    ],
    "meta": {
      "project": "1e6b8d30-2c4f-4a95-8d7e-b0a2c4e6f918",
      "author": { "reference": "Practitioner/5b8d2f90-1a3c-4e67-8d4b-7c9e0a2f1b63" },
      "lastUpdated": "2026-10-01T08:00:00.000Z"
    }
  },
  "members": [
    { "reference": "Practitioner/5b8d2f90-1a3c-4e67-8d4b-7c9e0a2f1b63", "display": "Demo Nurse" }
  ]
}

Optional fields are omitted when they have no value. They are not sent as null. See AccessPolicy model and membership for what the rule fields mean.

FieldTypeDescription
policyobjectThe access policy, as stored. It is the policy resource passed through as is, so the FHIR server can add standard fields that are not listed here (for example meta.versionId).
policy.resourceType"AccessPolicy"Always AccessPolicy.
policy.idstring (uuid)Policy id.
policy.namestringPolicy name.
policy.resourceobject[]The resource rules. Absent when the policy has none.
policy.resource[].resourceTypestringResource type the rule covers, for example Patient. * covers every resource type.
policy.resource[].interactionstring[]Allowed interactions: read, create, update, delete, search, history, vread. Absent when the stored rule has none.
policy.resource[].criteriastringOptional FHIR search expression that limits which resources the rule applies to. Present only on rules created outside this API.
policy.resource[].readonlybooleanOptional. true limits the rule to read-only behaviour. Present only on rules created outside this API.
policy.metaobjectResource metadata.
policy.meta.projectstring (uuid)Id of the project the policy belongs to.
policy.meta.authorobjectThe profile that wrote the policy.
policy.meta.author.referencestringReference to the author, for example Practitioner/<id>.
policy.meta.lastUpdatedstring (ISO 8601 date-time)When the policy was last written.
membersobject[]The practitioners who hold the policy. Empty when nobody does. Other kinds of profile are not listed.
members[].referencestringPractitioner reference, Practitioner/<id>.
members[].displaystringDisplay name, from the membership or the practitioner's name. Absent when neither has one.

Errors

StatusMeaning
401The bearer token is missing or invalid.
403The session is not a practitioner, admin or System Owner session, its access policy lacks Practitioner:create, or the policy is outside the caller's project scope.
404No access policy has this id.
422id is not a UUID.
503Your access policy could not be read, or the service is temporarily over capacity. Retry shortly, and honour Retry-After when it is present.

Last updated on

On this page