MATIH Platform is in active MVP development. Documentation reflects current implementation status.
7. Tenant Lifecycle
Deployment Endpoints

Deployment Endpoints

The deployment endpoints track platform-level deployments, providing version information, deployment history, and rollback capabilities. These endpoints are called by the CD pipeline and used by administrators for version management. Served by PlatformDeploymentController at /api/v1/platform/deployments.


Endpoints

MethodEndpointDescription
POST/api/v1/platform/deploymentsRecord a deployment
GET/api/v1/platform/deployments/currentGet current version
GET/api/v1/platform/deployments/:idGet deployment by ID
GET/api/v1/platform/deployments/tag/:imageTagGet deployment by tag
GET/api/v1/platform/deployments/historyGet deployment history
GET/api/v1/platform/deployments/branch/:gitBranchGet deployments by branch
POST/api/v1/platform/deployments/tag/:imageTag/rollbackMark as rolled back
GET/api/v1/platform/deployments/tag/:imageTag/existsCheck deployment exists

GET .../current

Returns the current platform version information:

{
  "imageTag": "v2.1.0-abc1234",
  "acrRegistry": "matih.azurecr.io",
  "gitCommit": "abc1234",
  "gitBranch": "main",
  "environment": "dev",
  "deployedAt": "2026-02-12T10:00:00Z",
  "deployedBy": "cd-pipeline",
  "isVersioned": true
}

Deployment History

GET .../history?environment=dev&limit=10

Returns the most recent deployments for the specified environment, ordered by deployment time descending.


Recording Deployments

Called by the CD pipeline to record each deployment:

{
  "imageTag": "v2.1.0-abc1234",
  "gitCommit": "abc1234",
  "gitBranch": "main",
  "environment": "dev",
  "acrRegistry": "matih.azurecr.io",
  "helmChartVersion": "1.3.0",
  "initiatedBy": "cd-pipeline",
  "serviceVersions": {
    "ai-service": "v2.1.0",
    "query-engine": "v2.1.0"
  },
  "notes": "Feature release with new BI dashboard"
}

Marking Rollbacks

POST .../tag/v2.1.0-abc1234/rollback

Marks a deployment as rolled back. This updates the deployment status and is used by the rollback scripts to maintain an accurate deployment history.