Project
This endpoint is used to create, update, search or delete project information inside a Terrakube organization. Projects allow you to group workspaces and manage team access at the project level.
To use this endpoint you should have "manageWorkspace" access at team level and a Terrakube organization
Entity fields:
data.type
string
Should be "project"
data.attributes.name
string
Unique project name for a Terrakube organization
data.attributes.description
string
Project description (OPTIONAL)
Example:
{
"data": {
"type": "project",
"attributes": {
"name": "My Project",
"description": "A sample project for grouping workspaces"
}
}
}Supported Operations
Returns the relationship project
organization Identifier
Filters the collection of project using a 'disjoint' RSQL expression
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 HTTP/1.1
Accept: */*
Successful response
{
"data": [],
"included": [
{
"attributes": {},
"id": "text",
"relationships": {},
"type": "text"
}
]
}Creates an item of type project and adds it to project
organization Identifier
Successful response
POST /api/v1/organization/{organizationId}/project HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 209
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
},
"projectAccess": {
"id": "text",
"type": "project_access"
}
}
}
}Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
},
"projectAccess": {
"id": "text",
"type": "project_access"
}
}
}
}Returns an instance of type project
organization Identifier
project Identifier
Successful response
GET /api/v1/organization/{organizationId}/project/{projectId} HTTP/1.1
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
},
"projectAccess": {
"id": "text",
"type": "project_access"
}
}
},
"included": [
{
"attributes": {},
"id": "text",
"relationships": {},
"type": "text"
}
]
}Modifies an instance of type project
organization Identifier
project Identifier
Successful response
No content
PATCH /api/v1/organization/{organizationId}/project/{projectId} HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 209
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
},
"projectAccess": {
"id": "text",
"type": "project_access"
}
}
}
}Successful response
No content
Deletes an instance of type project
organization Identifier
project Identifier
Successful response
No content
DELETE /api/v1/organization/{organizationId}/project/{projectId} HTTP/1.1
Accept: */*
Successful response
No content
Workspace Assignment
To assign a workspace to a project, use the workspace relationships endpoint. Set data to null to unassign.
Assign workspace to project:
Unassign workspace from project:
Assigns or unassigns a workspace to a project
organization Identifier
workspace Identifier
Successful response
No content
PATCH /api/v1/organization/{organizationId}/workspace/{workspaceId}/relationships/project HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 39
{
"data": {
"type": "project",
"id": "text"
}
}Successful response
No content
Last updated
Was this helpful?