Added deployments overview

This commit is contained in:
2026-04-06 22:04:50 +02:00
parent a95c76ce7e
commit 1978a31cbf
21 changed files with 1249 additions and 169 deletions
+143
View File
@@ -20,9 +20,42 @@ definitions:
type: array
id:
type: string
regex:
type: boolean
source:
type: string
type: object
models.Deployment:
properties:
commit_hash:
type: string
created_at:
type: string
finish_time:
type: string
id:
type: string
message:
type: string
site_id:
type: string
start_time:
type: string
status:
$ref: '#/definitions/models.DeploymentStatus'
type: object
models.DeploymentStatus:
enum:
- pending
- running
- success
- failed
type: string
x-enum-varnames:
- DeploymentStatusPending
- DeploymentStatusRunning
- DeploymentStatusSuccess
- DeploymentStatusFailed
models.ForwardRule:
properties:
destination:
@@ -45,6 +78,15 @@ definitions:
total:
type: integer
type: object
models.GetDeploymentsBySiteResponse:
properties:
deployments:
items:
$ref: '#/definitions/models.Deployment'
type: array
total:
type: integer
type: object
models.Header:
properties:
id:
@@ -58,6 +100,8 @@ definitions:
properties:
branch:
type: string
created_at:
type: string
custom_headers:
items:
$ref: '#/definitions/models.CustomHeaders'
@@ -76,6 +120,10 @@ definitions:
type: string
id:
type: string
index_file:
type: string
name:
type: string
not_found_file:
type: string
owner:
@@ -84,6 +132,13 @@ definitions:
type: string
spa:
type: boolean
trailing_slash:
type: boolean
type: object
models.ToggleEnabledResponse:
properties:
enabled:
type: boolean
type: object
host: localhost:4321
info:
@@ -249,6 +304,35 @@ paths:
summary: Create a header
tags:
- Headers
/deployments/{id}:
get:
consumes:
- application/json
description: Get a single deployment by its ID
parameters:
- description: Deployment ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Deployment'
"404":
description: Not Found
schema:
$ref: '#/definitions/models.APIError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Get deployment by ID
tags:
- Deployments
/forward-rules/{id}:
delete:
description: Deletes a forward rule by ID
@@ -635,6 +719,35 @@ paths:
summary: Create a custom header group
tags:
- Custom-Headers
/sites/{id}/enabled:
patch:
consumes:
- application/json
description: Enable or disable a site by its ID
parameters:
- description: Site ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.ToggleEnabledResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/models.APIError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Toggle site enabled status
tags:
- Sites
/sites/{id}/forward-rules:
get:
description: Returns all forward rules associated with the given site
@@ -702,6 +815,36 @@ paths:
summary: Create a forward rule
tags:
- Forward-Rules
/sites/{siteId}/deployments:
get:
consumes:
- application/json
description: Get a list of deployments for a specific site
parameters:
- description: Site ID
in: path
name: siteId
required: true
type: string
- default: 100
description: Maximum number of deployments to return
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.GetDeploymentsBySiteResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Get deployments for a site
tags:
- Deployments
swagger: "2.0"
tags:
- description: Manage sites