Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit cdee676

Browse files
committed
Update api documentation
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 999202a commit cdee676

File tree

1 file changed

+105
-10
lines changed

1 file changed

+105
-10
lines changed

site/.vuepress/public/specs/api.yaml

Lines changed: 105 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,24 @@ paths:
21472147
allOf:
21482148
- $ref: '#/components/schemas/configureCheck'
21492149
/admin/certificate:
2150+
get:
2151+
tags:
2152+
- admin
2153+
summary: Get root certificate
2154+
description: Get root certificate settings
2155+
operationId: admin#loadCertificate
2156+
security:
2157+
- basicAuth: []
2158+
responses:
2159+
'200':
2160+
description: The certificate settings
2161+
content:
2162+
application/json:
2163+
schema:
2164+
oneOf:
2165+
- $ref: '#/components/schemas/certificate-cfssl'
2166+
- $ref: '#/components/schemas/certificate-openssl'
2167+
/admin/certificate/cfssl:
21502168
post:
21512169
tags:
21522170
- admin
@@ -2160,7 +2178,7 @@ paths:
21602178
application/json:
21612179
schema:
21622180
allOf:
2163-
- $ref: '#/components/schemas/certificate'
2181+
- $ref: '#/components/schemas/certificate-cfssl'
21642182
responses:
21652183
'200':
21662184
description: 'If the response is successful, it is because the settings have been saved and the root certificate has been generated.'
@@ -2176,7 +2194,7 @@ paths:
21762194
description: CFSSL server is up?
21772195
data:
21782196
allOf:
2179-
- $ref: '#/components/schemas/certificate'
2197+
- $ref: '#/components/schemas/certificate-cfssl'
21802198
required:
21812199
- success
21822200
- data
@@ -2204,22 +2222,64 @@ paths:
22042222
success: false
22052223
message:
22062224
- parameter 'cfsslUri' is required!
2207-
get:
2225+
/admin/certificate/openssl:
2226+
post:
22082227
tags:
22092228
- admin
2210-
summary: Get root certificate
2211-
description: Get root certificate settings
2212-
operationId: admin#loadCertificate
2229+
summary: Create root certificate
2230+
description: Create root certificate and enable execution of OpenSSL
2231+
operationId: admin#generateCertificate
22132232
security:
22142233
- basicAuth: []
2234+
requestBody:
2235+
content:
2236+
application/json:
2237+
schema:
2238+
allOf:
2239+
- $ref: '#/components/schemas/certificate-openssl'
22152240
responses:
22162241
'200':
2217-
description: The certificate settings
2242+
description: 'If the response is successful, it is because the settings have been saved and the root certificate has been generated.'
22182243
content:
22192244
application/json:
22202245
schema:
2221-
allOf:
2222-
- $ref: '#/components/schemas/certificate'
2246+
type: object
2247+
properties:
2248+
success:
2249+
type: boolean
2250+
enum:
2251+
- true
2252+
description: CFSSL server is up?
2253+
data:
2254+
allOf:
2255+
- $ref: '#/components/schemas/certificate-openssl'
2256+
required:
2257+
- success
2258+
- data
2259+
example:
2260+
success: true
2261+
'401':
2262+
description: Request failed
2263+
content:
2264+
application/json:
2265+
schema:
2266+
type: object
2267+
properties:
2268+
success:
2269+
type: boolean
2270+
enum:
2271+
- false
2272+
description: CFSSL server is up?
2273+
message:
2274+
type: array
2275+
description: List of failures that occurred
2276+
required:
2277+
- success
2278+
- message
2279+
example:
2280+
success: false
2281+
message:
2282+
- parameter 'cfsslUri' is required!
22232283
components:
22242284
securitySchemes:
22252285
basicAuth:
@@ -2807,7 +2867,7 @@ components:
28072867
type: string
28082868
description: Returned when the status is error. Is a tip to solve the problem.
28092869
example: install java
2810-
certificate:
2870+
certificate-cfssl:
28112871
type: object
28122872
properties:
28132873
rootCert:
@@ -2847,3 +2907,38 @@ components:
28472907
- rootCert
28482908
- cfsslUri
28492909
- configPath
2910+
certificate-openssl:
2911+
type: object
2912+
properties:
2913+
rootCert:
2914+
type: object
2915+
description: Data to generate root certificate
2916+
properties:
2917+
commonName:
2918+
type: string
2919+
description: Common name
2920+
example: CommonName
2921+
names:
2922+
type: array
2923+
description: Custom cert name options
2924+
items:
2925+
type: object
2926+
properties:
2927+
id:
2928+
type: string
2929+
description: Short identifier
2930+
example: C
2931+
value:
2932+
type: string
2933+
description: Value of ID
2934+
example: BR
2935+
configPath:
2936+
type: string
2937+
description: The path that Nextcloud should save the OpenSSL root certificate.
2938+
example: /openssl/
2939+
generated:
2940+
type: boolean
2941+
description: Is OpenSSL certificate generated?
2942+
required:
2943+
- rootCert
2944+
- configPath

0 commit comments

Comments
 (0)