Skip to main content
PATCH
/
v0
/
resources
/
{resource_type}
/
{resource_id}
/
access
/
{access_id}
curl --request PATCH \
  --url 'https://api.unify.ai/v0/resources/<resource_type>/<resource_id>/access/<access_id>' \
  --header "Authorization: Bearer $UNIFY_KEY"
  --header 'Content-Type: application/json' \
  --data '{}'
{
    "id": "integer",
    "resource_type": "string",
    "resource_id": "integer",
    "role_id": "integer",
    "role_name": "string",
    "grantee_type": "string",
    "grantee_id": "string",
    "grantee_name": "string | null",
    "created_at": "string"
}
Update an existing resource access grant (change role). This is a more atomic alternative to revoking and re-granting access. Preserves the access ID and created_at timestamp. User must have write permission on the resource. Note: For org-level permissions, use OrganizationMember roles instead. :param request_fastapi: FastAPI request object. :param resource_type: Type of resource (“project”). :param resource_id: Resource ID. :param access_id: ResourceAccess ID to update. :param update_data: Update data containing new role_id. :param session: Database session. :return: Updated access entry.

Authorizations

Authorization
string
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

resource_type
string
required
resource_id
integer
required
access_id
integer
required

Body

role_id
integer
required
curl --request PATCH \
  --url 'https://api.unify.ai/v0/resources/<resource_type>/<resource_id>/access/<access_id>' \
  --header "Authorization: Bearer $UNIFY_KEY"
  --header 'Content-Type: application/json' \
  --data '{}'
{
    "id": "integer",
    "resource_type": "string",
    "resource_id": "integer",
    "role_id": "integer",
    "role_name": "string",
    "grantee_type": "string",
    "grantee_id": "string",
    "grantee_name": "string | null",
    "created_at": "string"
}