Skip to content

Commit 74568e6

Browse files
authored
Bootstrapping docs for integration API (#2921)
1 parent a0712c9 commit 74568e6

File tree

1 file changed

+112
-0
lines changed

1 file changed

+112
-0
lines changed

docs/reference/replicated-sdk-apis.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,118 @@ Response:
292292
}
293293
}
294294
```
295+
296+
## Integration
297+
298+
### GET /api/v1/integration/status
299+
300+
Get status of Development Mode. When this mode is enabled, the `app` API will use mock data. This value cannot be set programmatically. It is controlled by the installed license.
301+
302+
```json
303+
{
304+
"isEnabled": true
305+
}
306+
```
307+
308+
### GET /api/v1/integration/mock-data
309+
310+
Get mock data that is used when Development Mode is enabled.
311+
312+
```json
313+
{
314+
"appStatus": "ready",
315+
"helmChartURL": "oci://registry.replicated.com/dev-app/dev-channel/dev-parent-chart",
316+
"currentRelease": {
317+
"versionLabel": "0.1.3",
318+
"releaseNotes": "release notes 0.1.3",
319+
"createdAt": "2023-05-23T20:58:07Z",
320+
"deployedAt": "2023-05-23T21:58:07Z",
321+
"helmReleaseName": "dev-parent-chart",
322+
"helmReleaseRevision": 3,
323+
"helmReleaseNamespace": "default"
324+
},
325+
"deployedReleases": [
326+
{
327+
"versionLabel": "0.1.1",
328+
"releaseNotes": "release notes 0.1.1",
329+
"createdAt": "2023-05-21T20:58:07Z",
330+
"deployedAt": "2023-05-21T21:58:07Z",
331+
"helmReleaseName": "dev-parent-chart",
332+
"helmReleaseRevision": 1,
333+
"helmReleaseNamespace": "default"
334+
},
335+
{
336+
"versionLabel": "0.1.2",
337+
"releaseNotes": "release notes 0.1.2",
338+
"createdAt": "2023-05-22T20:58:07Z",
339+
"deployedAt": "2023-05-22T21:58:07Z",
340+
"helmReleaseName": "dev-parent-chart",
341+
"helmReleaseRevision": 2,
342+
"helmReleaseNamespace": "default"
343+
},
344+
{
345+
"versionLabel": "0.1.3",
346+
"releaseNotes": "release notes 0.1.3",
347+
"createdAt": "2023-05-23T20:58:07Z",
348+
"deployedAt": "2023-05-23T21:58:07Z",
349+
"helmReleaseName": "dev-parent-chart",
350+
"helmReleaseRevision": 3,
351+
"helmReleaseNamespace": "default"
352+
}
353+
],
354+
"availableReleases": [
355+
{
356+
"versionLabel": "0.1.4",
357+
"releaseNotes": "release notes 0.1.4",
358+
"createdAt": "2023-05-24T20:58:07Z",
359+
"deployedAt": "2023-05-24T21:58:07Z",
360+
"helmReleaseName": "",
361+
"helmReleaseRevision": 0,
362+
"helmReleaseNamespace": ""
363+
},
364+
{
365+
"versionLabel": "0.1.5",
366+
"releaseNotes": "release notes 0.1.5",
367+
"createdAt": "2023-06-01T20:58:07Z",
368+
"deployedAt": "2023-06-01T21:58:07Z",
369+
"helmReleaseName": "",
370+
"helmReleaseRevision": 0,
371+
"helmReleaseNamespace": ""
372+
}
373+
]
374+
}
375+
```
376+
377+
### POST /api/v1/integration/mock-data
378+
379+
Programmatically set mock data that is used when Development Mode is enabled. The payload will overwrite the existing mock data. Any data that is not included in the payload will be removed. For example, to remove release data, simply include empty arrays:
380+
381+
```
382+
POST http://replicated:3000/api/v1/integration/mock-data
383+
```
384+
385+
Request:
386+
387+
```json
388+
{
389+
"appStatus": "ready",
390+
"helmChartURL": "oci://registry.replicated.com/dev-app/dev-channel/dev-parent-chart",
391+
"currentRelease": {
392+
"versionLabel": "0.1.3",
393+
"releaseNotes": "release notes 0.1.3",
394+
"createdAt": "2023-05-23T20:58:07Z",
395+
"deployedAt": "2023-05-23T21:58:07Z",
396+
"helmReleaseName": "dev-parent-chart",
397+
"helmReleaseRevision": 3,
398+
"helmReleaseNamespace": "default"
399+
},
400+
"deployedReleases": [],
401+
"availableReleases": []
402+
}
403+
```
404+
405+
Response: Status `201` Created
406+
295407
## Examples
296408

297409
This section provides example use cases for the Replicated SDK API.

0 commit comments

Comments
 (0)