Projects
Projects group workloads within an organization. Assign workloads to a project with the project_id field on Create Workload or Update Workload.
Authentication
Authorization: Bearer <YOUR_API_TOKEN>
Create Project
Creates a project in the selected organization. If a project with the same name already exists, it is returned instead.
POST /tha/v3/orgs/{org_slug}/projects
Request Body
| Field | Type | Description |
|---|---|---|
name | string | Required. Project name. |
Example Request
curl -X POST https://api.targon.com/tha/v3/orgs/my-team/projects \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "production"
}'
Response
| Field | Type | Description |
|---|---|---|
uid | string | Project UID. |
name | string | Project name. |
created_at | string | ISO 8601 creation timestamp. |
updated_at | string | ISO 8601 last update timestamp. |
List Projects
Lists projects in the selected organization.
GET /tha/v3/orgs/{org_slug}/projects
| Query | Type | Description |
|---|---|---|
limit | integer | Max items. |
cursor | string | Pagination cursor. |
Get Project
Retrieves project details by project UID.
GET /tha/v3/orgs/{org_slug}/projects/{project_uid}
Update Project
Updates project fields by project UID.
PATCH /tha/v3/orgs/{org_slug}/projects/{project_uid}
Request Body
| Field | Type | Description |
|---|---|---|
name | string | Required. New project name. |
Delete Project
Deletes a project by UID. Projects with attached workloads cannot be deleted.
DELETE /tha/v3/orgs/{org_slug}/projects/{project_uid}
Returns 204 No Content.
Errors
| Status Code | Description |
|---|---|
| 400 | Invalid request or query parameters. |
| 401 | Invalid or missing token. |
| 403 | Forbidden. |
| 404 | Project not found. |
| 500 | Server error. |