Access assignments

Who: an access profile given to groups and people, optionally for a time window. Every change re-issues the affected credentials' Access Documents.

The access assignment model

One access profile given to groups and people, optionally only between valid_from and valid_to.

Properties

  • Name
    id
    Type
    string
    Description

    Access assignment ID.

  • Name
    etag
    Type
    string
    Description

    Current version.

  • Name
    access_profile_id
    Type
    string
    Description

    The profile given. Cannot change.

  • Name
    group_ids
    Type
    array of strings
    Description

    Members of these groups get the profile.

  • Name
    person_ids
    Type
    array of strings
    Description

    These people get the profile.

  • Name
    valid_from
    Type
    timestamp
    Description

    The assignment has no effect before this time. Can be null.

  • Name
    valid_to
    Type
    timestamp
    Description

    The assignment has no effect from this time. Used for temporary access. Can be null.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource, such as terraform. Can be null.

  • Name
    created_at
    Type
    timestamp
    Description

    When the assignment was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    When the assignment last changed.


GET/v1/access-assignments

List access assignments

Needs the access-assignments:read scope.

Query parameters

  • Name
    page_size
    Type
    integer
    Description

    Results per page, 1 to 200. 0 or absent means 50; more than 200 means 200 (AIP-158).

  • Name
    page_token
    Type
    string
    Description

    next_page_token from the previous page.

  • Name
    updated_since
    Type
    timestamp
    Description

    Only resources changed at or after this time.

  • Name
    access_profile_id
    Type
    string
    Description

    Only assignments of this profile.

  • Name
    group_id
    Type
    string
    Description

    Only assignments that name this group.

  • Name
    person_id
    Type
    string
    Description

    Only assignments that name this person directly.

Request

GET
/v1/access-assignments
curl https://acme.ext.passway.com/v1/access-assignments \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "data": [
    {
      "id": "asgn_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "etag": "3f9a",
      "access_profile_id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "group_ids": [
        "grp_01jd8k3m2v9x4q7r5t6w8y0z1a"
      ],
      "person_ids": [
        "per_01jd8k3m2v9x4q7r5t6w8y0z1a"
      ],
      "valid_from": "2026-11-30T14:02:11Z",
      "valid_to": "2026-11-30T14:02:11Z",
      "labels": {
        "passway.example/cost-center": "4410",
        "team": "facilities"
      },
      "managed_by": "terraform",
      "created_at": "2026-11-30T14:02:11Z",
      "updated_at": "2026-11-30T14:02:11Z"
    }
  ],
  "next_page_token": null
}

POST/v1/access-assignments

Create an access assignment

Needs the access-assignments:write scope.

Headers

  • Name
    Idempotency-Key
    Type
    string
    Description

    A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns 422; repeating it while the first is still running returns 409 with Retry-After.

Required attributes

  • Name
    access_profile_id
    Type
    string
    Description

    The profile to give.

Optional attributes

  • Name
    group_ids
    Type
    array of strings
    Description

    Members of these groups get the profile.

  • Name
    person_ids
    Type
    array of strings
    Description

    These people get the profile.

  • Name
    valid_from
    Type
    timestamp
    Description

    The assignment has no effect before this time.

  • Name
    valid_to
    Type
    timestamp
    Description

    The assignment has no effect from this time.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource. Terraform sets terraform.

Request

POST
/v1/access-assignments
curl -X POST https://acme.ext.passway.com/v1/access-assignments \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "access_profile_id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
    "valid_from": "2026-11-30T14:02:11Z",
    "valid_to": "2026-11-30T14:02:11Z",
    "labels": {
      "passway.example/cost-center": "4410",
      "team": "facilities"
    },
    "managed_by": "terraform"
  }'

Response

{
  "id": "asgn_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "access_profile_id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "group_ids": [
    "grp_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "person_ids": [
    "per_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "valid_from": "2026-11-30T14:02:11Z",
  "valid_to": "2026-11-30T14:02:11Z",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

GET/v1/access-assignments/{access_assignment_id}

Get an access assignment

Needs the access-assignments:read scope.

Path parameters

  • Name
    access_assignment_id
    Type
    string
    Description

    Access assignment ID: asgn_ followed by 1 to 64 lowercase letters and digits.

Request

GET
/v1/access-assignments/{access_assignment_id}
curl https://acme.ext.passway.com/v1/access-assignments/asgn_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "id": "asgn_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "access_profile_id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "group_ids": [
    "grp_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "person_ids": [
    "per_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "valid_from": "2026-11-30T14:02:11Z",
  "valid_to": "2026-11-30T14:02:11Z",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

PATCH/v1/access-assignments/{access_assignment_id}

Update an access assignment

A JSON merge patch (RFC 7396): fields in the body replace the current ones, null removes a field where the schema allows null, and objects such as labels are merged. Requires If-Match with the current etag.

Needs the access-assignments:write scope.

Path parameters

  • Name
    access_assignment_id
    Type
    string
    Description

    Access assignment ID: asgn_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Optional attributes

  • Name
    group_ids
    Type
    array of strings
    Description

    New groups.

  • Name
    person_ids
    Type
    array of strings
    Description

    New people.

  • Name
    valid_from
    Type
    timestamp
    Description

    New start, or null to remove it. Can be null.

  • Name
    valid_to
    Type
    timestamp
    Description

    New end, or null to remove it. Can be null.

  • Name
    labels
    Type
    object
    Description

    Labels to set or remove, or null to remove every label. Can be null.

  • Name
    managed_by
    Type
    string
    Description

    New managing tool, or null to clear it. Can be null.

Request

PATCH
/v1/access-assignments/{access_assignment_id}
curl -X PATCH https://acme.ext.passway.com/v1/access-assignments/asgn_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"' \
  -H "Content-Type: application/merge-patch+json" \
  -d '{
    "valid_from": "2026-11-30T14:02:11Z",
    "valid_to": "2026-11-30T14:02:11Z",
    "labels": {
      "old-label": null,
      "team": "security"
    }
  }'

Response

{
  "id": "asgn_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "access_profile_id": "prof_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "group_ids": [
    "grp_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "person_ids": [
    "per_01jd8k3m2v9x4q7r5t6w8y0z1a"
  ],
  "valid_from": "2026-11-30T14:02:11Z",
  "valid_to": "2026-11-30T14:02:11Z",
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": "terraform",
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

DELETE/v1/access-assignments/{access_assignment_id}

Delete an access assignment

Access given only by this assignment is removed from every affected credential.

Needs the access-assignments:write scope.

Path parameters

  • Name
    access_assignment_id
    Type
    string
    Description

    Access assignment ID: asgn_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Request

DELETE
/v1/access-assignments/{access_assignment_id}
curl -X DELETE https://acme.ext.passway.com/v1/access-assignments/asgn_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"'

Response

204 Deleted