iallocator: add ht-checking for the request
[ganeti-local] / doc / rapi.rst
index 3729973..fbc9970 100644 (file)
@@ -70,6 +70,10 @@ HTTP Basic authentication as per :rfc:`2617` is supported.
 .. _JSON: http://www.json.org/
 .. _REST: http://en.wikipedia.org/wiki/Representational_State_Transfer
 
+HTTP requests with a body (e.g. ``PUT`` or ``POST``) require the request
+header ``Content-type`` be set to ``application/json`` (see :rfc:`2616`
+(HTTP/1.1), section 7.2.1).
+
 
 A note on JSON as used by RAPI
 ++++++++++++++++++++++++++++++
@@ -493,6 +497,46 @@ Body parameters:
    :exclude: group_name, force, dry_run
 
 
+``/2/groups/[group_name]/tags``
++++++++++++++++++++++++++++++++
+
+Manages per-nodegroup tags.
+
+Supports the following commands: ``GET``, ``PUT``, ``DELETE``.
+
+``GET``
+~~~~~~~
+
+Returns a list of tags.
+
+Example::
+
+    ["tag1", "tag2", "tag3"]
+
+``PUT``
+~~~~~~~
+
+Add a set of tags.
+
+The request as a list of strings should be ``PUT`` to this URI. The
+result will be a job id.
+
+It supports the ``dry-run`` argument.
+
+
+``DELETE``
+~~~~~~~~~~
+
+Delete a tag.
+
+In order to delete a set of tags, the DELETE request should be addressed
+to URI like::
+
+    /tags?tag=[tag]&tag=[tag]
+
+It supports the ``dry-run`` argument.
+
+
 ``/2/instances``
 ++++++++++++++++
 
@@ -568,8 +612,8 @@ Body parameters:
 
 ``__version__`` (int, required)
   Must be ``1`` (older Ganeti versions used a different format for
-  instance creation requests, version ``0``, but that format is not
-  documented and should no longer be used).
+  instance creation requests, version ``0``, but that format is no
+  longer supported)
 
 .. opcode_params:: OP_INSTANCE_CREATE
 
@@ -655,6 +699,9 @@ Shutdowns an instance.
 
 It supports the ``dry-run`` argument.
 
+.. opcode_params:: OP_INSTANCE_SHUTDOWN
+   :exclude: instance_name, dry_run
+
 
 ``/2/instances/[instance_name]/startup``
 ++++++++++++++++++++++++++++++++++++++++