sahara/api-ref/source/plugins.inc
Shu Yingya 6ccc0997c7 [Api-ref] fix description of response parameters
There is something wrong in API ref, this changes fixed it:
1. change the response parameter description of "description",
   "id" and "name" and so on
2. some request parameter in the url path should be marked as
   "required"

Change-Id: I738fc5a3f490f9cc321349445249f7dcd9aaf4e7
Closes-Bug: 1636522
2017-02-07 20:04:16 +08:00

188 lines
2.8 KiB
ReStructuredText

.. -*- rst -*-
=======
Plugins
=======
A plugin object defines the Hadoop or Spark version that it can
install and which configurations can be set for the cluster.
Show plugin details
===================
.. rest_method:: GET /v1.1/{project_id}/plugins/{plugin_name}
Shows details for a plugin.
Normal response codes: 200
Error response codes: 400, 500
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: url_project_id
- plugin_name: url_plugin_name
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- versions: versions
- title: title
- description: description_plugin
- name: plugin_name
Response Example
----------------
.. literalinclude:: samples/plugins/plugin-show-response.json
:language: javascript
List plugins
============
.. rest_method:: GET /v1.1/{project_id}/plugins
Lists all registered plugins.
Normal response codes: 200
Error response codes: 400, 500
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: url_project_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- title: title
- versions: versions
- plugins: plugins
- description: description_plugin
- name: plugin_name
Response Example
----------------
.. literalinclude:: samples/plugins/plugins-list-response.json
:language: javascript
Show plugin version details
===========================
.. rest_method:: GET /v1.1/{project_id}/plugins/{plugin_name}/{version}
Shows details for a plugin version.
Normal response codes: 200
Error response codes: 400, 500
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: url_project_id
- plugin_name: url_plugin_name
- version: version
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- versions: versions
- title: title
- description: description_plugin
- name: plugin_name
Response Example
----------------
.. literalinclude:: samples/plugins/plugin-version-show-response.json
:language: javascript
Update plugin details
=====================
.. rest_method:: PATCH /v1.1/{project_id}/plugins/{plugin_name}
Updates details for a plugin.
Normal response codes: 202
Error response codes: 400, 500
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: url_project_id
- plugin_name: url_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_plugin
- name: plugin_name
Response Example
----------------
.. literalinclude:: samples/plugins/plugin-update-response.json
:language: javascript