Skip to content

Commit 30076b1

Browse files
committed
fix: update docs and on ssl endpoint
1 parent 4d27099 commit 30076b1

File tree

1 file changed

+53
-4
lines changed

1 file changed

+53
-4
lines changed

swagger.yml

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,22 @@ paths:
158158
post:
159159
operationId: provisionSiteTLSCertificate
160160
tags: [sniCertificate]
161+
description: >-
162+
Provisions or updates a TLS certificate for the site.
163+
164+
165+
**Creating a certificate (site has no certificate):**
166+
167+
- Omit certificate params to initiate Let's Encrypt provisioning
168+
169+
- Provide certificate, key, and ca_certificates to upload a custom certificate
170+
171+
172+
**Updating a certificate (site already has a certificate):**
173+
174+
- REQUIRES certificate, key, and ca_certificates to replace with a new custom certificate
175+
176+
- Use POST /api/v1/sites/{site_id}/ssl/renew to renew an existing Let's Encrypt certificate
161177
parameters:
162178
- name: site_id
163179
type: string
@@ -166,17 +182,23 @@ paths:
166182
- name: certificate
167183
type: string
168184
in: query
185+
description: PEM-encoded certificate. Required when updating an existing certificate.
169186
- name: key
170187
type: string
171188
in: query
189+
description: PEM-encoded private key. Required when updating an existing certificate.
172190
- name: ca_certificates
173191
type: string
174192
in: query
193+
description: PEM-encoded CA certificate chain. Required when updating an existing certificate.
175194
responses:
176195
'200':
177196
description: OK
178197
schema:
179198
$ref: '#/definitions/sniCertificate'
199+
'422':
200+
description: >-
201+
Unprocessable Entity. Returns errors such as: "certificate parameter is required when updating an existing certificate" (when updating without params), "No custom domain configured", or "bad dns for custom domain"
180202
default:
181203
$ref: '#/responses/error'
182204
get:
@@ -1208,17 +1230,44 @@ paths:
12081230
post:
12091231
operationId: createSiteBuild
12101232
tags: [build]
1233+
description: 'Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available. Files for build could be also uploaded as a zipped site.'
12111234
parameters:
1212-
- name: build
1213-
in: body
1214-
schema:
1215-
$ref: '#/definitions/buildSetup'
1235+
- name: branch
1236+
description: The branch to build; defaults to main branch
12161237
required: false
1238+
in: query
1239+
type: string
1240+
- name: clear_cache
1241+
description: Whether to clear the build cache before building
1242+
required: false
1243+
in: query
1244+
type: boolean
1245+
- name: image
1246+
description: The build image tag to use for the build
1247+
required: false
1248+
in: query
1249+
type: string
1250+
- name: template_id
1251+
description: The build template to use for the build
1252+
required: false
1253+
in: query
1254+
type: string
1255+
- name: title
1256+
description: The title of the build
1257+
required: false
1258+
in: query
1259+
type: string
12171260
responses:
12181261
'200':
12191262
description: OK
12201263
schema:
12211264
$ref: '#/definitions/build'
1265+
'400':
1266+
description: Bad Request
1267+
'404':
1268+
description: Not Found
1269+
'422':
1270+
description: Unprocessable Entity
12221271
default:
12231272
$ref: '#/responses/error'
12241273
/sites/{site_id}/deployed-branches:

0 commit comments

Comments
 (0)