Skip to main content
POST
/
v0
/
resources
/
{resource_type}
/
{resource_id}
/
access
curl --request POST \
  --url 'https://api.unify.ai/v0/resources/<resource_type>/<resource_id>/access' \
  --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"
}
Grant access to a resource (project). Only works for organizational resources. Personal resources cannot be shared. User must have appropriate permissions 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_data: Access grant data. :param session: Database session. :return: Created 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

Body

role_id
integer
required
grantee_type
string
required
grantee_id
string
required
curl --request POST \
  --url 'https://api.unify.ai/v0/resources/<resource_type>/<resource_id>/access' \
  --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"
}