Project Access
This endpoint is used to manage team access within a Terrakube project. Project-level permissions are inherited by all workspaces within the project.
To use this endpoint you should have "manageWorkspace" access at team level or be a project admin
Roles
admin
Full control: manage workspaces, plan/approve jobs, manage project team access
write
Manage workspaces, plan and apply jobs
plan
Plan jobs only (cannot approve or apply)
read
Read-only access (no changes allowed)
Entity fields:
data.type
string
Should be "project_access"
data.attributes.name
string
Team name to grant access
data.attributes.role
string
Role: "admin", "write", "plan", or "read"
data.attributes.manageWorkspace
boolean
Permission to create, update, and delete workspaces within the project
data.attributes.manageJob
boolean
Permission to manage jobs within the project
data.attributes.planJob
boolean
Permission to plan jobs within the project
data.attributes.approveJob
boolean
Permission to approve and apply jobs within the project
data.attributes.manageState
boolean
Permission to manage Terraform state within the project
Example:
Supported Operations
Returns the relationship projectAccess
organization Identifier
project Identifier
Number of pages to return. Can be used with page[size]
Number of elements per page. Can be used with page[number]
Offset from 0 to start paginating. Can be used with page[limit]
Maximum number of items to return. Can be used with page[offset]
For requesting total pages/records be included in the response page meta data
Successful response
GET /api/v1/organization/{organizationId}/project/{projectId}/projectAccess HTTP/1.1
Accept: */*
Successful response
{
"data": [],
"included": [
{
"attributes": {},
"id": "text",
"relationships": {},
"type": "text"
}
]
}Creates an item of type project_access and adds it to projectAccess
organization Identifier
project Identifier
Successful response
POST /api/v1/organization/{organizationId}/project/{projectId}/projectAccess HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 231
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"role": "admin",
"manageWorkspace": true,
"manageState": true,
"manageJob": true,
"planJob": true,
"approveJob": true
},
"relationships": {
"project": {
"id": "text",
"type": "project"
}
}
}
}Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"role": "admin",
"manageWorkspace": true,
"manageState": true,
"manageJob": true,
"planJob": true,
"approveJob": true
},
"relationships": {
"project": {
"id": "text",
"type": "project"
}
}
}
}Returns an instance of type project_access
organization Identifier
project Identifier
project_access Identifier
Successful response
GET /api/v1/organization/{organizationId}/project/{projectId}/projectAccess/{projectAccessId} HTTP/1.1
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"role": "admin",
"manageWorkspace": true,
"manageState": true,
"manageJob": true,
"planJob": true,
"approveJob": true
},
"relationships": {
"project": {
"id": "text",
"type": "project"
}
}
}
}Modifies an instance of type project_access
organization Identifier
project Identifier
project_access Identifier
Successful response
No content
PATCH /api/v1/organization/{organizationId}/project/{projectId}/projectAccess/{projectAccessId} HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 231
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"role": "admin",
"manageWorkspace": true,
"manageState": true,
"manageJob": true,
"planJob": true,
"approveJob": true
},
"relationships": {
"project": {
"id": "text",
"type": "project"
}
}
}
}Successful response
No content
Deletes an instance of type project_access
organization Identifier
project Identifier
project_access Identifier
Successful response
No content
DELETE /api/v1/organization/{organizationId}/project/{projectId}/projectAccess/{projectAccessId} HTTP/1.1
Accept: */*
Successful response
No content
Last updated
Was this helpful?