Permits to load and save sat-nms device preset definitions as well as to read the list of presets defined on a given M&C.
Supported HTTP methods: GET, PUT, HEAD, OPTIONS
GET /api/v1/presets/{mncName}
Returns an ItemList document containing the list of preset directories found on the given M&C. This is the list of device drivers which have at least one preset saved on this M&C.
Parameters:
| Parameter | Description |
|---|---|
| mncName | The name of the M&C from which the preset directory list shall be loaded. |
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns an ItemList containing the requested preset directory list. |
| 401 | not logged in. In this case a ApiError document is returned, describing details of the error. |
| 404 | no M&C with the given name exists. In this case a ApiError document is returned, describing details of the error. |
If the given M&C name exists, but there are no presets stored at all, the request returns 200 OK and an empty list.
GET /api/v1/presets/{mncName}/{driverName}
Returns an ItemList document containing the list of presets defined this device driver on the given M&C.
Parameters:
| Parameter | Description |
|---|---|
| mncName | The name of the M&C from which the preset list shall be loaded. |
| driverName | The name of the device driver for which the preset list shall be loaded. |
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns an ItemList containing the requested preset list. |
| 401 | not logged in. In this case a ApiError document is returned, describing details of the error. |
| 404 | no M&C with the given name exists. In this case a ApiError document is returned, describing details of the error. |
If the given M&C name exists, but there are no presets stored for the driver type, the request returns 200 OK and an empty list.
GET /api/v1/presets/{mncName}/{driverName}/{presetName}
Returns a DevicePreset document containing the requested preset.
Parameters:
| Parameter | Description |
|---|---|
| mncName | The name of the M&C from which the preset shall be loaded. |
| driverName | The name of the device driver for which the preset shall be loaded. |
| presetName | The name of the preset to load. |
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a DevicePreset containing the requested preset. |
| 401 | not logged in. In this case a ApiError document is returned, describing details of the error. |
| 404 | either M&C with the given name exists or at the known M&C there exists no preset with the requested driver/name combination. In this case a ApiError document is returned, describing details of the error. |
PUT /api/v1/presets/{mncName}/{driverName}/{presetName}
Saves a preset on the given M&C. Expects DevicePreset document containing the preset text to save as request body. The name and driver fields in the DevicePreset document will be ignored, the preset will be saved under the driver / name given in the URL. As every PUT request, this will either overwrite an existing preset with this name or create a new preset definition at the M&C if no preset with this name exists.
Parameters:
| Parameter | Description |
|---|---|
| mncName | The name of the M&C on which the preset shall be saved. |
| driverName | The name of the device driver for which the preset shall be saved. |
| presetName | The name of the preset to save. |
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns the DevicePreset containing the saved preset. This will have the name and driver fields set the values under which the preset actually has been saved. |
| 401 | not logged in. In this case a ApiError document is returned, describing details of the error. |
| 404 | no M&C with the given name exists. In this case a ApiError document is returned, describing details of the error. |
DELETE /api/v1/presets/{mncName}/{driverName}/{presetName}
Deletes a preset from the given M&C. Expects no request body.
Parameters:
| Parameter | Description |
|---|---|
| mncName | The name of the M&C from which the preset shall be deleted. |
| driverName | The name of the device driver for which the preset shall be deleted. |
| presetName | The name of the preset to delete. |
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns the DevicePreset containing the deleted preset. |
| 401 | not logged in. In this case a ApiError document is returned, describing details of the error. |
| 404 | no M&C with the given name exists or no device preset with that name / device driver could be found. In this case a ApiError document is returned, describing details of the error. |