+``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.
+
+
+.. _rapi-res-instances-multi-alloc:
+
+``/2/instances-multi-alloc``
+++++++++++++++++++++++++++++
+
+Tries to allocate multiple instances.
+
+.. rapi_resource_details:: /2/instances-multi-alloc
+
+
+.. _rapi-res-instances-multi-alloc+post:
+
+``POST``
+~~~~~~~~
+
+The parameters:
+
+.. opcode_params:: OP_INSTANCE_MULTI_ALLOC
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_MULTI_ALLOC
+
+
+.. _rapi-res-instances:
+
+``/2/instances``
+++++++++++++++++
+
+The instances resource.
+
+.. rapi_resource_details:: /2/instances
+
+
+.. _rapi-res-instances+get:
+
+``GET``
+~~~~~~~
+
+Returns a list of all available instances.
+
+Example::
+
+ [
+ {
+ "name": "web.example.com",
+ "uri": "\/instances\/web.example.com"
+ },
+ {
+ "name": "mail.example.com",
+ "uri": "\/instances\/mail.example.com"
+ }
+ ]
+
+If the optional bool *bulk* argument is provided and set to a true value
+(i.e ``?bulk=1``), the output contains detailed information about
+instances as a list.
+
+Returned fields: :pyeval:`utils.CommaJoin(sorted(rlib2.I_FIELDS))`.
+
+Example::
+
+ [
+ {
+ "status": "running",
+ "disk_usage": 20480,
+ "nic.bridges": [
+ "xen-br0"
+ ],
+ "name": "web.example.com",
+ "tags": ["tag1", "tag2"],
+ "beparams": {
+ "vcpus": 2,
+ "memory": 512
+ },
+ "disk.sizes": [
+ 20480
+ ],
+ "pnode": "node1.example.com",
+ "nic.macs": ["01:23:45:67:89:01"],
+ "snodes": ["node2.example.com"],
+ "disk_template": "drbd",
+ "admin_state": true,
+ "os": "debian-etch",
+ "oper_state": true,
+ …
+ },
+ …
+ ]
+
+
+.. _rapi-res-instances+post:
+
+``POST``
+~~~~~~~~
+
+Creates an instance.
+
+If the optional bool *dry-run* argument is provided, the job will not be
+actually executed, only the pre-execution checks will be done. Query-ing
+the job result will return, in both dry-run and normal case, the list of
+nodes selected for the instance.
+
+Returns: a job ID that can be used later for polling.
+
+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 no
+ longer supported)
+
+.. opcode_params:: OP_INSTANCE_CREATE
+
+Earlier versions used parameters named ``name`` and ``os``. These have
+been replaced by ``instance_name`` and ``os_type`` to match the
+underlying opcode. The old names can still be used.
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_CREATE
+
+
+.. _rapi-res-instances-instance_name:
+
+``/2/instances/[instance_name]``
+++++++++++++++++++++++++++++++++
+
+Instance-specific resource.
+
+.. rapi_resource_details:: /2/instances/[instance_name]
+
+
+.. _rapi-res-instances-instance_name+get:
+
+``GET``
+~~~~~~~
+
+Returns information about an instance, similar to the bulk output from
+the instance list.
+
+Returned fields: :pyeval:`utils.CommaJoin(sorted(rlib2.I_FIELDS))`.
+
+
+.. _rapi-res-instances-instance_name+delete:
+
+``DELETE``
+~~~~~~~~~~
+
+Deletes an instance.
+
+It supports the ``dry-run`` argument.
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_REMOVE
+
+
+.. _rapi-res-instances-instance_name-info:
+
+``/2/instances/[instance_name]/info``
++++++++++++++++++++++++++++++++++++++++
+
+.. rapi_resource_details:: /2/instances/[instance_name]/info
+
+
+.. _rapi-res-instances-instance_name-info+get:
+
+``GET``
+~~~~~~~
+
+Requests detailed information about the instance. An optional parameter,
+``static`` (bool), can be set to return only static information from the
+configuration without querying the instance's nodes. The result will be
+a job id.
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_QUERY_DATA
+
+
+.. _rapi-res-instances-instance_name-reboot:
+
+``/2/instances/[instance_name]/reboot``
++++++++++++++++++++++++++++++++++++++++
+
+Reboots URI for an instance.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/reboot
+
+
+.. _rapi-res-instances-instance_name-reboot+post:
+
+``POST``
+~~~~~~~~
+
+Reboots the instance.
+
+The URI takes optional ``type=soft|hard|full`` and
+``ignore_secondaries=0|1`` parameters.
+
+``type`` defines the reboot type. ``soft`` is just a normal reboot,
+without terminating the hypervisor. ``hard`` means full shutdown
+(including terminating the hypervisor process) and startup again.
+``full`` is like ``hard`` but also recreates the configuration from
+ground up as if you would have done a ``gnt-instance shutdown`` and
+``gnt-instance start`` on it.
+
+``ignore_secondaries`` is a bool argument indicating if we start the
+instance even if secondary disks are failing.
+
+It supports the ``dry-run`` argument.
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_REBOOT
+
+
+.. _rapi-res-instances-instance_name-shutdown:
+
+``/2/instances/[instance_name]/shutdown``
++++++++++++++++++++++++++++++++++++++++++
+
+Instance shutdown URI.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/shutdown
+
+
+.. _rapi-res-instances-instance_name-shutdown+put:
+
+``PUT``
+~~~~~~~
+
+Shutdowns an instance.
+
+It supports the ``dry-run`` argument.
+
+.. opcode_params:: OP_INSTANCE_SHUTDOWN
+ :exclude: instance_name, dry_run
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_SHUTDOWN
+
+
+.. _rapi-res-instances-instance_name-startup:
+
+``/2/instances/[instance_name]/startup``
+++++++++++++++++++++++++++++++++++++++++
+
+Instance startup URI.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/startup
+
+
+.. _rapi-res-instances-instance_name-startup+put:
+
+``PUT``
+~~~~~~~
+
+Startup an instance.
+
+The URI takes an optional ``force=1|0`` parameter to start the
+instance even if secondary disks are failing.
+
+It supports the ``dry-run`` argument.
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_STARTUP
+
+
+.. _rapi-res-instances-instance_name-reinstall:
+
+``/2/instances/[instance_name]/reinstall``
+++++++++++++++++++++++++++++++++++++++++++++++
+
+Installs the operating system again.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/reinstall
+
+
+.. _rapi-res-instances-instance_name-reinstall+post:
+
+``POST``
+~~~~~~~~
+
+Returns a job ID.
+
+Body parameters:
+
+``os`` (string, required)
+ Instance operating system.
+``start`` (bool, defaults to true)
+ Whether to start instance after reinstallation.
+``osparams`` (dict)
+ Dictionary with (temporary) OS parameters.
+
+For backwards compatbility, this resource also takes the query
+parameters ``os`` (OS template name) and ``nostartup`` (bool). New
+clients should use the body parameters.
+
+
+.. _rapi-res-instances-instance_name-replace-disks:
+
+``/2/instances/[instance_name]/replace-disks``
+++++++++++++++++++++++++++++++++++++++++++++++
+
+Replaces disks on an instance.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/replace-disks
+
+
+.. _rapi-res-instances-instance_name-replace-disks+post:
+
+``POST``
+~~~~~~~~
+
+Returns a job ID.
+
+Body parameters:
+
+.. opcode_params:: OP_INSTANCE_REPLACE_DISKS
+ :exclude: instance_name
+
+Ganeti 2.4 and below used query parameters. Those are deprecated and
+should no longer be used.
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_REPLACE_DISKS
+
+
+.. _rapi-res-instances-instance_name-activate-disks:
+
+``/2/instances/[instance_name]/activate-disks``
++++++++++++++++++++++++++++++++++++++++++++++++
+
+Activate disks on an instance.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/activate-disks
+
+
+.. _rapi-res-instances-instance_name-activate-disks+put:
+
+``PUT``
+~~~~~~~
+
+Takes the bool parameter ``ignore_size``. When set ignore the recorded
+size (useful for forcing activation when recorded size is wrong).
+
+Job result:
+
+.. opcode_result:: OP_INSTANCE_ACTIVATE_DISKS
+
+
+.. _rapi-res-instances-instance_name-deactivate-disks:
+
+``/2/instances/[instance_name]/deactivate-disks``
++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Deactivate disks on an instance.
+
+.. rapi_resource_details:: /2/instances/[instance_name]/deactivate-disks
+
+
+.. _rapi-res-instances-instance_name-deactivate-disks+put:
+
+``PUT``
+~~~~~~~