diff --git a/api-ref/source/plugins.inc b/api-ref/source/plugins.inc index 793b79b386..959fd8d251 100644 --- a/api-ref/source/plugins.inc +++ b/api-ref/source/plugins.inc @@ -135,3 +135,53 @@ Response Example + +Update plugin details +===================== + +.. rest_method:: PATCH /v1.1/{tenant_id}/plugins/{plugin_name} + +Updates details for a plugin. + + +Normal response codes:202 +Error response codes: + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - tenant_id: url_tenant_id + - plugin_name: plugin_name + + +Request Example +--------------- + +.. literalinclude:: samples/plugins/plugin-update-request.json + :language: javascript + + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - title: title + - versions: versions + - description: description + - name: name + + +Response Example +---------------- + +.. literalinclude:: samples/plugins/plugin-update-response.json + :language: javascript + + + + diff --git a/api-ref/source/samples/plugins/plugin-update-request.json b/api-ref/source/samples/plugins/plugin-update-request.json new file mode 100644 index 0000000000..97a17c38f2 --- /dev/null +++ b/api-ref/source/samples/plugins/plugin-update-request.json @@ -0,0 +1,7 @@ +{ + "plugin_labels": { + "enabled": { + "status": false + } + } +} diff --git a/api-ref/source/samples/plugins/plugin-update-response.json b/api-ref/source/samples/plugins/plugin-update-response.json new file mode 100644 index 0000000000..7541ae939c --- /dev/null +++ b/api-ref/source/samples/plugins/plugin-update-response.json @@ -0,0 +1,32 @@ +{ + "plugin": { + "plugin_labels": { + "hidden": { + "status": true, + "mutable": true, + "description": "Existence of plugin or its version is hidden, but still can be used for cluster creation by CLI and directly by client." + }, + "enabled": { + "status": false, + "mutable": true, + "description": "Plugin or its version is enabled and can be used by user." + } + }, + "description": "It's a fake plugin that aimed to work on the CirrOS images. It doesn't install Hadoop. It's needed to be able to test provisioning part of Sahara codebase itself.", + "versions": [ + "0.1" + ], + "tenant_id": "993f53c1f51845e48e013aeb632358d8", + "title": "Fake Plugin", + "version_labels": { + "0.1": { + "enabled": { + "status": true, + "mutable": true, + "description": "Plugin or its version is enabled and can be used by user." + } + } + }, + "name": "fake" + } +}