projects
Manage projects and their settings.
GET
/v1/projects
List all projects for the authenticated org
Auth:
Admin API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id |
query | uuid | No | Filter projects by workspace ID |
Responses
200
List of projects
countprojects
401
Missing or invalid API key
Example
Request
curl https://api.tripswitch.dev/v1/projects \
-H "Authorization: Bearer YOUR_ADMIN_API_KEY"
Response
{
"projects": [
{
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-service",
"workspace_id": "770e8400-e29b-41d4-a716-446655440000",
"inserted_at": "2024-01-15T10:30:00Z"
}
],
"count": 1
}
GET
/v1/projects/:id
Retrieve a project
Auth:
User API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | uuid | Yes | Project ID |
Responses
200
Project details
enable_signed_ingestnameproject_idslack_webhook_urltrace_id_url_templateworkspace_id
404
Project not found
Example
Request
curl https://api.tripswitch.dev/v1/projects/PROJECT_ID \
-H "Authorization: Bearer YOUR_USER_API_KEY"
Response
{
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-service",
"workspace_id": "770e8400-e29b-41d4-a716-446655440000",
"enable_signed_ingest": false,
"slack_webhook_url": null,
"trace_id_url_template": "https://jaeger.example.com/trace/{{value}}"
}
POST
/v1/projects
Create a new project
Auth:
User API key
Request Body
workspace_id
*
name
Responses
201
Project created successfully
ingest_secretnameproject_id
400
Invalid request payload
401
Missing or invalid API key
422
Missing required workspace_id
Example
Request
curl -X POST https://api.tripswitch.dev/v1/projects \
-H "Authorization: Bearer YOUR_USER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "my-service", "workspace_id": "WORKSPACE_ID"}'
Response
{
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-service",
"ingest_secret": "secret_abc123..."
}
PATCH
/v1/projects/:id
Update project settings
Auth:
User API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | uuid | Yes | Project ID |
Request Body
enable_signed_ingest
name
slack_webhook_url
trace_id_url_template
Responses
200
Project updated
enable_signed_ingestnameproject_idslack_webhook_urltrace_id_url_templateworkspace_id
404
Project not found
422
Validation failed
Example
Request
curl -X PATCH https://api.tripswitch.dev/v1/projects/PROJECT_ID \
-H "Authorization: Bearer YOUR_USER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "new-name", "enable_signed_ingest": true}'
Response
{
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "new-name",
"enable_signed_ingest": true,
"slack_webhook_url": null,
"trace_id_url_template": "https://tool.example/trace/{{value}}"
}
POST
/v1/projects/:id/ingest_secret/rotate
Rotate the project's ingest secret
Auth:
User API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | uuid | Yes | Project ID |
Responses
200
Secret rotated
ingest_secret
404
Project not found
Example
Request
curl -X POST https://api.tripswitch.dev/v1/projects/PROJECT_ID/ingest_secret/rotate \
-H "Authorization: Bearer YOUR_USER_API_KEY"
Response
{
"ingest_secret": "secret_new123..."
}