-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdsdm-v1.yml
160 lines (160 loc) · 4.37 KB
/
dsdm-v1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
openapi: 3.1.0
info:
title: Dynamic Subdomain Management Protocol (DSDM)
version: '1.0'
description: Automated protocol for issuing and managing dynamically allocated subdomains.
contact:
name: dyn.direct
email: [email protected]
license:
name: MIT
identifier: MIT
servers:
- url: https://v1.dyn.direct
paths:
/:
get:
summary: Server Overview
operationId: get-overview
description: Returns an overview of the server.
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/OverviewResponse'
example:
version: '1.0.0'
/subdomain:
post:
summary: Request new subdomain
operationId: generate-subdomain
description: Request a new subdomain.
responses:
'200':
description: Subdomain allocated.
content:
application/json:
schema:
$ref: '#/components/schemas/NewSubdomainResponse'
example:
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
token: ZXhhbXBsZQ
'429':
description: Too many requests made.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: too-many-requests
message: Too many requests have been made from your IP address.
/subdomain/{subdomainId}/acme-challenge:
post:
summary: Set ACME challenge tokens
operationId: subdomain-acme-challenge
description: Set ACME challenge tokens for subdomain.
parameters:
- in: path
name: subdomainId
description: ID of the subdomain to add to.
schema:
type: string
format: uuid
description: Subdomain ID.
required: true
example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SubdomainAcmeChallengeRequest'
example:
token: ZXhhbXBsZQ
responses:
'200':
description: Subdomain allocated.
'403':
description: Invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: invalid-token
message: The provided token is not valid for the subdomain.
'429':
description: Too many requests made.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: too-many-requests
message: Too many requests have been made from your IP address.
components:
schemas:
OverviewResponse:
title: OverviewResponse
type: object
properties:
version:
type: string
description: Server Version.
client_ip:
type: string
description: The clients IP address.
required:
- version
- client_ip
NewSubdomainResponse:
title: NewSubdomainResponse
type: object
description: New Subdomain Response.
properties:
id:
type: string
format: uuid
description: Subdomain ID.
token:
type: string
description: Control Token.
domain:
type: string
description: Allocated domain.
required:
- id
- token
- domain
SubdomainAcmeChallengeRequest:
title: SubdomainAcmeChallengeRequest
type: object
description: Subdomain ACME Challenge Request.
properties:
token:
type: string
description: Control Token.
values:
type: array
description: ACME Tokens.
items:
type: string
maxLength: 255
minItems: 0
maxItems: 10
required:
- token
- values
ErrorResponse:
title: ErrorResponse
type: object
properties:
error:
type: string
message:
type: string
required:
- error
- message