Skip to main content

Apps

Apps provide a way to group related workloads together within a project.

Authentication

All app endpoints require authentication using a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer <YOUR_API_KEY>

Create App

Create a new app.

Endpoint

POST /tha/v2/apps

Request Body

FieldTypeDescription
namestringRequired. Name for the app.
project_idstringUID of the project this app belongs to.

Example Request

curl -X POST https://api.targon.com/tha/v2/apps \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "my-app",
"project_id": "prj-abc123def456"
}'

Response

Returns the app object. If an app with the same name already exists, it returns the existing app with 200. Otherwise returns 201.

FieldTypeDescription
uidstringUnique identifier for the app.
namestringName of the app.
project_idstringUID of the parent project.
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last update timestamp.

Example Response

{
"uid": "app-abc123def456",
"name": "my-app",
"project_id": "prj-abc123def456",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}

Errors

Status CodeDescription
400 - Bad RequestInvalid request body.
401 - UnauthorizedInvalid or missing API key.
403 - ForbiddenNot allowed.
404 - Not FoundRelated project not found.
500 - Internal Server ErrorServer error.

List Apps

List all apps for the authenticated user.

Endpoint

GET /tha/v2/apps

Query Parameters

FieldTypeDescription
limitintegerMaximum number of items to return.
cursorstringPagination cursor.
project_idstringFilter apps by project UID.

Example Request

curl -X GET "https://api.targon.com/tha/v2/apps?project_id=prj-abc123def456&limit=10" \
-H "Authorization: Bearer <YOUR_API_KEY>"

Response

FieldTypeDescription
itemsarrayList of app objects.
next_cursorstringCursor for the next page of results.

Example Response

{
"items": [
{
"uid": "app-abc123def456",
"name": "my-app",
"project_id": "prj-abc123def456",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}
],
"next_cursor": ""
}

Errors

Status CodeDescription
400 - Bad RequestInvalid query parameters.
401 - UnauthorizedInvalid or missing API key.
500 - Internal Server ErrorServer error.

Get App

Retrieve an app by its UID.

Endpoint

GET /tha/v2/apps/{app_uid}

Path Parameters

FieldTypeDescription
app_uidstringUnique identifier of the app.

Example Request

curl -X GET https://api.targon.com/tha/v2/apps/app-abc123def456 \
-H "Authorization: Bearer <YOUR_API_KEY>"

Response

Returns the app object.

Example Response

{
"uid": "app-abc123def456",
"name": "my-app",
"project_id": "prj-abc123def456",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}

Errors

Status CodeDescription
401 - UnauthorizedInvalid or missing API key.
403 - ForbiddenNot allowed.
404 - Not FoundApp not found.
500 - Internal Server ErrorServer error.

Update App

Update an app's fields.

Endpoint

PATCH /tha/v2/apps/{app_uid}

Path Parameters

FieldTypeDescription
app_uidstringUnique identifier of the app.

Request Body

FieldTypeDescription
namestringNew name for the app.
project_idstringNew project UID to move the app to.

Example Request

curl -X PATCH https://api.targon.com/tha/v2/apps/app-abc123def456 \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "renamed-app"
}'

Response

Returns the updated app object.

Example Response

{
"uid": "app-abc123def456",
"name": "renamed-app",
"project_id": "prj-abc123def456",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-16T08:00:00Z"
}

Errors

Status CodeDescription
400 - Bad RequestInvalid request body.
401 - UnauthorizedInvalid or missing API key.
403 - ForbiddenNot allowed.
404 - Not FoundApp or related project not found.
500 - Internal Server ErrorServer error.

Delete App

Delete an app.

Endpoint

DELETE /tha/v2/apps/{app_uid}

Path Parameters

FieldTypeDescription
app_uidstringUnique identifier of the app.

Example Request

curl -X DELETE https://api.targon.com/tha/v2/apps/app-abc123def456 \
-H "Authorization: Bearer <YOUR_API_KEY>"

Response

Returns 204 No Content on success.

Errors

Status CodeDescription
401 - UnauthorizedInvalid or missing API key.
403 - ForbiddenNot allowed.
404 - Not FoundApp not found.
500 - Internal Server ErrorServer error.