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.
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
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
{
"data": [
{
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"description": null,
"name": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"organization": {
"data": [
null
]
},
"projectAccess": {
"data": [
null
]
}
}
}
],
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Creates an item of type project and adds it to project
organization Identifier
Successful response
POST /api/v1/organization/{organizationId}/project HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 311
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"description": null,
"name": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"organization": {
"data": [
null
]
},
"projectAccess": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"description": null,
"name": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"organization": {
"data": [
null
]
},
"projectAccess": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Returns an instance of type project
organization Identifier
project Identifier
Successful response
GET /api/v1/organization/{organizationId}/project/{projectId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"description": null,
"name": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"organization": {
"data": [
null
]
},
"projectAccess": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Modifies an instance of type project
organization Identifier
project Identifier
Successful response
No content
PATCH /api/v1/organization/{organizationId}/project/{projectId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 311
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"description": null,
"name": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"organization": {
"data": [
null
]
},
"projectAccess": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}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
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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:
Replaces the relationship project
workspace Identifier
Successful response
No content
PATCH /api/v1/workspace/{workspaceId}/relationships/project HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 39
{
"data": {
"type": "project",
"id": "text"
}
}Successful response
No content
Last updated
Was this helpful?