Projects & Services API¶
Endpoints for managing projects, services, and integration bindings (SCM and CI/CD).
Projects¶
List Projects¶
Returns all projects accessible to the authenticated user's organisation.
Create Project¶
Request body:
Get Project¶
Returns details for a single project, including its services.
Update Project¶
Request body:
Delete Project¶
Services¶
Services belong to a project and represent individual deployable components.
List Services¶
Returns all services within the specified project.
Add Service¶
Request body:
Delete Service¶
Custom (Infra) Services¶
Lists and creates project-local infrastructure services that aren't tied to an SCM/CI-CD binding — e.g. a database, a message broker, or a managed cache. Useful for tracking dependencies you want the AI to correlate against but don't have code for.
Integration Bindings¶
Bindings link a service to an external SCM or CI/CD provider. Each service can have one SCM binding and multiple CI/CD bindings.
List SCM Bindings¶
Returns all SCM bindings for the organisation.
Create SCM Binding¶
Request body:
{
"service": 1,
"provider_type": "github",
"repository": "owner/repo",
"access_token": "glpat-..."
}
Auto-Link Suggestions¶
Returns detected CI/CD pipelines in the repository. Use this to discover available pipelines before creating a CI/CD binding.
Auto-Link a Pipeline¶
Request body:
Creates the CI/CD binding for the suggested pipeline in one call. Skips having to call POST /api/projects/cicd-bindings/ separately.
Set Up SCM Webhook¶
Registers a repository webhook on the linked SCM provider that points back at /api/webhooks/scm/{binding_id}/. Uses the credentials stored on the parent ProviderIntegration.
Sync SCM Binding¶
Pulls the latest branch list and repository metadata for this binding. Also refreshes last_sync_at.
Create CI/CD Binding¶
Request body:
{
"service": 1,
"provider_type": "jenkins",
"pipeline_id": "job/build-main",
"base_url": "https://jenkins.example.com"
}
Trigger Build¶
Request body:
Triggers a new build on the linked CI/CD pipeline.
Set Up CI/CD Webhook¶
Registers a pipeline webhook that points back at the provider-specific SerOps handler under /api/webhooks/{provider}/{binding_id}/. Idempotent — running it again updates the existing webhook.
Sync CI/CD Binding¶
Refreshes recent pipeline runs, job status, and deployment events for this binding.
Health Check (All Bindings)¶
Runs a connectivity check against all configured integration bindings and returns their status.
Deployments¶
A ProjectDeployment is one instance of "where a project runs" — the composed shape (environment × cluster × region × namespace). The batch pipeline runs once per active deployment, so multi-region and multi-cluster projects get analysed independently per copy.
A default deployment is auto-created for each active environment (via a Django post-save signal). Add more here when you have parallel deployments in different regions, clusters, or K8s namespaces.
List Deployments¶
Returns all deployments the caller can see (filtered to their organisation). Pass ?project= to filter to one project.
Response element:
{
"id": 42,
"project": 7,
"environment": 3,
"environment_name": "production",
"environment_display_name": "Production",
"cluster": 12,
"cluster_name": "prod-eks",
"cluster_provider": "AWS EKS",
"region": "us-east-1",
"namespace": "payments",
"name": "checkout · prod-eks · us-east-1 · ns=payments",
"is_active": true,
"created_at": "…",
"updated_at": "…"
}
Create Deployment¶
Request body:
{
"project": 7,
"environment": 3,
"cluster": 12,
"region": "us-east-1",
"namespace": "payments",
"is_active": true
}
Invariants:
- namespace may only be set when cluster is set (DB CheckConstraint).
- (project, environment, cluster, region, namespace) must be unique.
- (project, name) must be unique. If name is omitted the model composes one from the four dimensions on save.
Update / Delete Deployment¶
Deleting a deployment stops the batch pipeline for that shape. Existing batches keep their history but no new ones are created.
Suggest Deployments for a New Cluster¶
Returns proposed deployments for a newly-registered cluster — one per (project × active environment) that could plausibly live on it. The frontend presents these as a modal so the user accepts individual rows rather than auto-creating dozens.
Related¶
- Integrations -- Global SCM/CI-CD provider management
- Observability -- Log and metric provider connections
- API Overview -- Base URL, response format, and error codes