Skip to content

Commit c8de41f

Browse files
committed
feat: Update option when installing a custom integration
The `update=true` option allows updating an installed custom integration without having to delete it first.
1 parent 1f15ac2 commit c8de41f

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

core-api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ in YAML format.
2727

2828
| UCR Firmware | Core Simulator | REST API | WS API |
2929
|--------------|----------------|----------|--------|
30+
| | | 0.46.0 | 0.35.3 |
3031
| 2.9.1-beta | 0.71.0 | 0.45.3 | 0.35.3 |
3132
| 2.9.0-beta | 0.70.4 | 0.45.1 | 0.35.1 |
3233
| 2.8.4-beta | 0.69.3 | 0.44.4 | 0.34.0 |

core-api/rest/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ This section contains unreleased changes which will be part of an upcoming relea
1616

1717
---
1818

19+
## 0.46.0
20+
- Update option when installing a custom integration.
21+
1922
## 0.45.3
2023
### Added
2124
- Add an optional description field to AvailableEntity.

core-api/rest/UCR-core-openapi.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.1.1
22
info:
33
title: Remote Two/3 REST Core-API
44
summary: REST Core-API for Remote Two/3
5-
version: 0.45.4
5+
version: 0.46.0
66
contact:
77
name: API Support
88
url: https://github.com/unfoldedcircle/core-api/issues
@@ -1649,12 +1649,20 @@ paths:
16491649
- `STATE_DIRECTORY`: data directory.
16501650
- The returned path may not be stored, it may change with future software updates.
16511651

1652+
Existing custom integrations can be updated by setting the `update` query parameter to `true`.
1653+
- A custom integration must be installed having the same `driver_id`, otherwise error `404` is returned.
1654+
- Existing configuration files are not replaced.
1655+
- It is recommended to not include dynamic configuration files in the archive. The integration should create them
1656+
at runtime and automatically migrate them if required.
1657+
- All binary and data files are overwritten.
1658+
16521659
To delete a custom integration, use the regular endpoints to delete an integration instance and driver:
16531660
- Delete integration `DELETE /api/intg/instances/:intgId`.
16541661
- Delete driver and installation files: `DELETE /api/intg/drivers/:driverId`.
16551662

16561663
Error response codes:
16571664
- `400`: invalid archive, missing data in archive or included metadata cannot be read.
1665+
- `404`: custom integration not found for updating, there's no installed custom integration with the same `driver_id`.
16581666
- `409`: custom integration is not compatible with the current firmware or the maximum amount of custom integration
16591667
installations has been reached.
16601668
- `413`: archive is too large.
@@ -1663,6 +1671,13 @@ paths:
16631671
installation and the device needs to be restarted.
16641672
- `507`: insufficient storage to upload and process installation archive.
16651673
operationId: installCustomIntegration
1674+
parameters:
1675+
- name: update
1676+
in: query
1677+
description: Update an existing custom integration.
1678+
required: false
1679+
schema:
1680+
type: boolean
16661681
requestBody:
16671682
content:
16681683
multipart/form-data:
@@ -1686,6 +1701,8 @@ paths:
16861701
$ref: '#/components/responses/Err401Unauthorized'
16871702
'403':
16881703
$ref: '#/components/responses/Err403Forbidden'
1704+
'404':
1705+
$ref: '#/components/responses/Err404NotFound'
16891706
'409':
16901707
$ref: '#/components/responses/Err409Conflict'
16911708
'413':

0 commit comments

Comments
 (0)