Grant Access
Grant an access on a resource
Request
Parameters
resource_type*string (enum)Type of the resource the access grants apply to. Only 'universe' for now.
Values: "universe"resource_id*uuidUnique identifier of the universe.
Example: "75ebc096-749e-4b8f-b690-df13daf49c62"
Request Body
grant_typestring (enum)Whether the grant targets a single user or a whole organization.
Default: "USER"Values: "USER", "ORGANIZATION"grant_id*uuidIdentifier of the user or organization the grant targets, depending on resource_type.
Example: "3fa85f64-5717-4562-b3fc-2c963f66afa6"access_level*string (enum)Level of access granted on the universe.
Values: "OWNER", "READ_WRITE", "READ_ONLY"
{
"grant_type": "USER",
"grant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"access_level": "OWNER"
}Response
Access successfully granted
acl_id*uuidUnique identifier of the access grant.
Example: "9c858e93-6f36-4f3e-9c34-5f6a1a3d9b21"resource_type*string (enum)Type of the resource the access grants apply to. Only 'universe' for now.
Values: "universe"resource_id*uuidUnique identifier of the universe.
Example: "75ebc096-749e-4b8f-b690-df13daf49c62"grant_type*string (enum)Whether the grant targets a single user or a whole organization.
Values: "USER", "ORGANIZATION"grant_id*uuidIdentifier of the user or organization the grant targets, depending on resource_type.
Example: "3fa85f64-5717-4562-b3fc-2c963f66afa6"access_level*string (enum)Level of access granted on the universe.
Values: "OWNER", "READ_WRITE", "READ_ONLY"granted_by*uuidIdentifier of the user who created this grant.
Example: "d290f1ee-6c54-4b01-90e6-d701748f0851"granted_at*date-timeWhen this grant was created.
Example: "2024-01-01T00:00:00.000Z"
{
"acl_id": "9c858e93-6f36-4f3e-9c34-5f6a1a3d9b21",
"resource_type": "universe",
"resource_id": "75ebc096-749e-4b8f-b690-df13daf49c62",
"grant_type": "USER",
"grant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"access_level": "OWNER",
"granted_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"granted_at": "2024-01-01T00:00:00.000Z"
}Error
Bad request
message*stringError message.
Example: "Check the errors field for more details"code*number (enum)Error code.
Values: 400reason*string (enum)Error reason.
Values: "invalid"errorsobject[]Possible error causes.
Array length: [1, ∞]
{
"message": "Check the errors field for more details",
"code": 400,
"reason": "invalid",
"errors": [
{
"message": "string",
"field": "grant_type",
"reason": "invalid_type"
}
]
}Forbidden
message*stringError message.
Example: "You are not allowed to update this universe"code*number (enum)Error code.
Values: 403reason*string (enum)Error reason.
Values: "forbidden"
{
"message": "You are not allowed to update this universe",
"code": 403,
"reason": "forbidden"
}Not found
message*stringError message.
Example: "The requested universe does not exist or is not visible to your organization."code*number (enum)Error code.
Values: 404reason*string (enum)Error reason.
Values: "not_found"
{
"message": "The requested universe does not exist or is not visible to your organization.",
"code": 404,
"reason": "not_found"
}Conflict
message*stringError message.
Example: "An access grant already exists for this resource and target. Delete it first to change its access level."code*number (enum)Error code.
Values: 409reason*string (enum)Error reason.
Values: "invalid"
{
"message": "An access grant already exists for this resource and target. Delete it first to change its access level.",
"code": 409,
"reason": "invalid"
}Generic errors are not shown, see Errors for more details.