Applications API
Endpoints for the canonical applications registry. Applications are
top-level entities — the same application can be linked to multiple
projects via memberships. See Applications & branch
tracking for the data model.
List applications
GET /api/applications
GET /api/applications?activeOnly=false # include soft-deleted
GET /api/applications?applicationType=MOBILE_APP # filter by type
Read one
GET /api/applications/{id}
Create / update / delete
POST /api/applications
PUT /api/applications/{id}
DELETE /api/applications/{id} # soft-delete (is_active=false)
Request body for create/update:
{
"name": "User Service API",
"applicationType": "REST_SERVICE",
"applicationTech": "SPRING_BOOT",
"gitUrl": "https://github.com/example/user-service",
"defaultBranch": "main",
"swaggerPath": "/v3/api-docs"
}
swaggerPath (release#107) — relative path the app exposes its OpenAPI
spec at. New SPRING_BOOT apps default to /v3/api-docs if omitted.
Project memberships
GET /api/applications/{id}/projects # list memberships
POST /api/applications/{id}/link-project/{projectId} # idempotent link
DELETE /api/applications/{id}/link-project/{projectId} # unlink
Mobile config (if applicable)
GET /api/applications/{id}/mobile-config
Returns 404 if the Application is not a MOBILE_APP.
Resolve runtime swagger URL (release#107)
GET /api/applications/{id}/swagger-url?environment={id|name}
Resolve the full runtime swagger URL by pairing the application's
swaggerPath with an environment target's base URL. Handles per-env
overrides.
Resolution order
env_target.swaggerJsonUrl— explicit full-URL override →source: "env_override"env_target.baseUrl + env_target.swaggerPath— env owns both →source: "env_composed"env_target.baseUrl + application.swaggerPath— common case →source: "composed"nullwith a human-readablereason→source: "none"
Response
{
"applicationId": 2,
"applicationName": "User Service API",
"environmentId": 1,
"environmentName": "development",
"environmentTargetId": 100,
"environmentTargetUrl": "http://user-service:8089",
"swaggerPath": "/v3/api-docs",
"computedSwaggerUrl": "http://user-service:8089/v3/api-docs",
"source": "composed"
}
Linking applications to environment targets
The resolver looks for an environment target in the requested
environment whose appTag matches application.appTag, then falls
back to a case-insensitive name match. Set appTag on both sides when
you want stable linking — name fallback is best-effort.
Examples
# Composed URL — app provides path, env provides base
curl -H "Authorization: Bearer $TOKEN" \
"$URL/api/applications/2/swagger-url?environment=development"
# By environment name OR id (both work)
curl -H "Authorization: Bearer $TOKEN" \
"$URL/api/applications/2/swagger-url?environment=1"