-
Notifications
You must be signed in to change notification settings - Fork 235
Expand file tree
/
Copy pathstatic-export-openapi.json
More file actions
304 lines (304 loc) · 9.77 KB
/
Copy pathstatic-export-openapi.json
File metadata and controls
304 lines (304 loc) · 9.77 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
{
"openapi": "3.0.1",
"info": {
"title": "Mintlify Static Export API",
"description": "Programmatically generate a self-contained static export of your documentation and download it as a single bundle. Available on Enterprise plans.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.mintlify.com/v1"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/static-export/jobs": {
"post": {
"summary": "Start static export job",
"description": "Start a static export job for a deployment. The job pre-renders your documentation into a self-contained set of static HTML, RSC, and asset files. Returns a job ID you can use to poll status and, once complete, generate a downloadable bundle.\n\nStatic export is available on Enterprise plans.",
"operationId": "startStaticExportJob",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StartStaticExportRequest"
}
}
}
},
"responses": {
"202": {
"description": "The export job was accepted and queued.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StaticExportJob"
}
}
}
},
"401": {
"description": "Authentication failed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"400": {
"description": "The request body is invalid. Check that `domain` is a reachable hostname and that `paths` entries are valid page paths.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Static export is not enabled for this organization. Contact sales to enable it on an Enterprise plan.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/static-export/jobs/{jobId}": {
"get": {
"summary": "Get static export job status",
"description": "Retrieve the current status and progress of a static export job. Poll this endpoint after starting a job until `status` is `completed` (or `failed`).\n\nStatic export is available on Enterprise plans.",
"operationId": "getStaticExportJob",
"parameters": [
{
"name": "jobId",
"in": "path",
"description": "The ID of the static export job returned by `Start static export job`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The current state of the export job.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StaticExportJob"
}
}
}
},
"401": {
"description": "Authentication failed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "No job exists with the provided ID.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/static-export/jobs/{jobId}/bundle": {
"post": {
"summary": "Generate export bundle",
"description": "Package a completed static export job into a single archive and return a download link. The link is a presigned S3 URL — download it before `expiresAt`.\n\nThe job must have a `status` of `completed` before a bundle can be generated.\n\nStatic export is available on Enterprise plans.",
"operationId": "generateStaticExportBundle",
"parameters": [
{
"name": "jobId",
"in": "path",
"description": "The ID of a completed static export job.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A presigned S3 link to the static export bundle.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BundleResponse"
}
}
}
},
"401": {
"description": "Authentication failed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "No job exists with the provided ID.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "The job has not finished yet, so a bundle cannot be generated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "Admin API key. Generate one on the API keys page in your dashboard."
}
},
"schemas": {
"StartStaticExportRequest": {
"type": "object",
"required": ["domain"],
"properties": {
"domain": {
"type": "string",
"description": "The domain of the deployment to export, for example `docs.example.com`.",
"example": "docs.example.com"
},
"version": {
"type": "string",
"description": "An optional version label to tag this export. Defaults to the latest published version.",
"example": "2024-06-01"
},
"paths": {
"type": "array",
"description": "An optional list of page paths to include. When omitted, every published page is exported.",
"items": {
"type": "string"
},
"example": ["index", "guides/getting-started", "api-reference/introduction"]
}
}
},
"StaticExportJob": {
"type": "object",
"required": ["jobId", "status", "progress", "pageCount", "createdAt", "updatedAt"],
"properties": {
"jobId": {
"type": "string",
"description": "Unique identifier for the static export job.",
"example": "se_3f9a2c1b8e7d4a06"
},
"status": {
"type": "string",
"description": "The current state of the job.",
"enum": ["queued", "running", "completed", "failed"],
"example": "running"
},
"progress": {
"type": "number",
"description": "Completion percentage from 0 to 100.",
"minimum": 0,
"maximum": 100,
"example": 42
},
"pageCount": {
"type": "integer",
"description": "The number of pages exported so far.",
"example": 128
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "When the job was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "When the job was last updated."
},
"error": {
"type": "string",
"description": "A human-readable error message. Present only when `status` is `failed`.",
"nullable": true
}
}
},
"BundleResponse": {
"type": "object",
"required": ["jobId", "bundleUrl", "sizeBytes", "expiresAt"],
"properties": {
"jobId": {
"type": "string",
"description": "The ID of the job this bundle was generated for.",
"example": "se_3f9a2c1b8e7d4a06"
},
"bundleUrl": {
"type": "string",
"format": "uri",
"description": "A presigned S3 link to the static export bundle archive. Download it before the link expires.",
"example": "https://mintlify-static-exports.s3.amazonaws.com/se_3f9a2c1b8e7d4a06/bundle.tar.gz?X-Amz-Signature=..."
},
"sizeBytes": {
"type": "integer",
"description": "The size of the bundle in bytes.",
"example": 18432000
},
"expiresAt": {
"type": "string",
"format": "date-time",
"description": "When the presigned link expires."
}
}
},
"Error": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "A human-readable description of the error."
}
}
}
}
}
}