You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: platform-api/spec/impls/api-lifecycle-management.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,11 @@
2
2
3
3
## Entry Points
4
4
5
-
-`platform-api/src/internal/handler/api.go` – implements `/api/v1/apis` CRUD, `/api/v1/projects/:projectId/apis` listing routes and `/api/v1/apis/:apiId/deploy-revision` for API deployment
6
-
-`platform-api/src/internal/service/api.go` – validates names, contexts, versions, orchestrates default values and generates deployment YAML and deploys APIs in the Gateway plus repository calls.
5
+
-`platform-api/src/internal/handler/api.go` – implements `/api/v1/apis` CRUD, `/api/v1/projects/:projectId/apis` listing routes, `/api/v1/apis/:apiId/deploy-revision` for API deployment, and `/api/v1/apis/:apiId/gateways` for retrieving deployment status
6
+
-`platform-api/src/internal/service/api.go` – validates names, contexts, versions, orchestrates default values and generates deployment YAML and deploys APIs in the Gateway plus repository calls. Also handles gateway deployment queries.
7
7
-`platform-api/src/internal/repository/api.go` – persists APIs, security, CORS, backend services, rate limiting, and operations using transactions.
8
-
-`platform-api/src/internal/database/schema.sql` – contains tables for APIs, security configs, backend services, rate limits, and operations.
8
+
-`platform-api/src/internal/repository/gateway.go` – handles gateway operations including querying which gateways have specific APIs deployed.
9
+
-`platform-api/src/internal/database/schema.sql` – contains tables for APIs, security configs, backend services, rate limits, operations, and API deployments tracking.
9
10
-`platform-api/src/resources/openapi.yaml` – provides the published API lifecycle contract for client integrations.
10
11
11
12
## Behaviour
@@ -14,10 +15,15 @@
14
15
2. Repository layer writes the main API record and related configuration tables within a single transaction.
15
16
3. GET routes return fully hydrated API structures, including nested security and backend definitions.
16
17
4. Update requests replace mutable fields and rebuild related configuration sets; deletes cascade via foreign keys.
17
-
5. Generates comprehensive deployment API YAML including:
18
+
5. Gateway deployment tracking uses the `api_deployments` table to maintain relationships between APIs and gateways.
19
+
6. The gateways endpoint queries deployed APIs by joining API deployments with gateway records, filtered by organization for security.
20
+
7. Generates comprehensive deployment API YAML including:
- List: `curl -k https://localhost:8443/api/v1/projects/<projectId>/apis` to verify pagination metadata and entries.
23
28
- Deploy API: `curl -k -X POST https://localhost:8443/api/v1/apis/<apiId>/deploy-revision -H 'Content-Type: application/json' -d '[{"name": "production-deployment","gatewayId": "987e6543-e21b-45d3-a789-426614174999", "displayOnDevportal": true}]'` to trigger API deployment.
29
+
- Get API Gateways: `curl -k https://localhost:8443/api/v1/apis/<apiId>/gateways` to retrieve all gateways where the API is deployed; expect JSON array with gateway details (id, name, displayName, vhost, isActive, etc.).
0 commit comments