rapi.rst 14.3 KB
Newer Older
1 2 3
Ganeti remote API
=================

Iustin Pop's avatar
Iustin Pop committed
4
Documents Ganeti version |version|
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

.. contents::

Introduction
------------

Ganeti supports a remote API for enable external tools to easily
retrieve information about a cluster's state. The remote API daemon,
*ganeti-rapi*, is automatically started on the master node. By default
it runs on TCP port 5080, but this can be changed either in
``.../constants.py`` or via the command line parameter *-p*. SSL mode,
which is used by default, can also be disabled by passing command line
parameters.

Protocol
--------

The protocol used is JSON_ over HTTP designed after the REST_
principle.

.. _JSON: http://www.json.org/
.. _REST: http://en.wikipedia.org/wiki/Representational_State_Transfer

28 29 30
Generic parameters
------------------

31 32
A few parameter mean the same thing across all resources which implement
it.
33 34 35 36

``bulk``
++++++++

Iustin Pop's avatar
Iustin Pop committed
37 38 39 40 41
Bulk-mode means that for the resources which usually return just a list
of child resources (e.g. ``/2/instances`` which returns just instance
names), the output will instead contain detailed data for all these
subresources. This is more efficient than query-ing the sub-resources
themselves.
42 43 44 45 46 47 48 49

``dry-run``
+++++++++++

The optional *dry-run* argument, if provided and set to a positive
integer value (e.g. ``?dry-run=1``), signals to Ganeti that the job
should not be executed, only the pre-execution checks will be done.

Iustin Pop's avatar
Iustin Pop committed
50 51 52
This is useful in trying to determine (without guarantees though, as in
the meantime the cluster state could have changed) if the operation is
likely to succeed or at least start executing.
53

54 55 56 57 58 59
``force``
+++++++++++

Force operation to continue even if it will cause the cluster to become
inconsistent (e.g. because there are not enough master candidates).

60 61 62
Usage examples
--------------

Iustin Pop's avatar
Iustin Pop committed
63 64
You can access the API using your favorite programming language as long
as it supports network connections.
65 66 67 68

Shell
+++++

Iustin Pop's avatar
Iustin Pop committed
69 70
.. highlight:: sh

71 72
Using wget::

Iustin Pop's avatar
Iustin Pop committed
73
   wget -q -O - https://CLUSTERNAME:5080/2/info
74 75 76 77 78 79 80 81 82

or curl::

  curl https://CLUSTERNAME:5080/2/info


Python
++++++

Iustin Pop's avatar
Iustin Pop committed
83 84 85
.. highlight:: python

::
86 87

  import urllib2
Tim Boring's avatar
Tim Boring committed
88
  f = urllib2.urlopen('https://CLUSTERNAME:5080/2/info')
89 90 91 92 93 94
  print f.read()


JavaScript
++++++++++

95
.. warning:: While it's possible to use JavaScript, it poses several
Iustin Pop's avatar
Iustin Pop committed
96 97 98
   potential problems, including browser blocking request due to
   non-standard ports or different domain names. Fetching the data on
   the webserver is easier.
99

Iustin Pop's avatar
Iustin Pop committed
100 101
.. highlight:: javascript

102 103
::

Tim Boring's avatar
Tim Boring committed
104
  var url = 'https://CLUSTERNAME:5080/2/info';
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
  var info;
  var xmlreq = new XMLHttpRequest();
  xmlreq.onreadystatechange = function () {
    if (xmlreq.readyState != 4) return;
    if (xmlreq.status == 200) {
      info = eval("(" + xmlreq.responseText + ")");
      alert(info);
    } else {
      alert('Error fetching cluster info');
    }
    xmlreq = null;
  };
  xmlreq.open('GET', url, true);
  xmlreq.send(null);

Resources
---------

Iustin Pop's avatar
Iustin Pop committed
123
.. highlight:: javascript
124

Iustin Pop's avatar
Iustin Pop committed
125 126
``/``
+++++
127

Iustin Pop's avatar
Iustin Pop committed
128
The root resource.
129

Iustin Pop's avatar
Iustin Pop committed
130
It supports the following commands: ``GET``.
131

Iustin Pop's avatar
Iustin Pop committed
132 133
``GET``
~~~~~~~
134

Iustin Pop's avatar
Iustin Pop committed
135
Shows the list of mapped resources.
136

Iustin Pop's avatar
Iustin Pop committed
137
Returns: a dictionary with 'name' and 'uri' keys for each of them.
138

Iustin Pop's avatar
Iustin Pop committed
139 140
``/2``
++++++
141

Iustin Pop's avatar
Iustin Pop committed
142
The ``/2`` resource, the root of the version 2 API.
143

Iustin Pop's avatar
Iustin Pop committed
144
It supports the following commands: ``GET``.
145

Iustin Pop's avatar
Iustin Pop committed
146 147
``GET``
~~~~~~~
148

Iustin Pop's avatar
Iustin Pop committed
149
Show the list of mapped resources.
150

Iustin Pop's avatar
Iustin Pop committed
151
Returns: a dictionary with ``name`` and ``uri`` keys for each of them.
152

Iustin Pop's avatar
Iustin Pop committed
153 154
``/2/info``
+++++++++++
155

Iustin Pop's avatar
Iustin Pop committed
156
Cluster information resource.
157

Iustin Pop's avatar
Iustin Pop committed
158
It supports the following commands: ``GET``.
159

Iustin Pop's avatar
Iustin Pop committed
160 161
``GET``
~~~~~~~
162

Iustin Pop's avatar
Iustin Pop committed
163
Returns cluster information.
164

Iustin Pop's avatar
Iustin Pop committed
165
Example::
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195

  {
    "config_version": 2000000,
    "name": "cluster",
    "software_version": "2.0.0~beta2",
    "os_api_version": 10,
    "export_version": 0,
    "candidate_pool_size": 10,
    "enabled_hypervisors": [
      "fake"
    ],
    "hvparams": {
      "fake": {}
     },
    "default_hypervisor": "fake",
    "master": "node1.example.com",
    "architecture": [
      "64bit",
      "x86_64"
    ],
    "protocol_version": 20,
    "beparams": {
      "default": {
        "auto_balance": true,
        "vcpus": 1,
        "memory": 128
       }
      }
    }

196 197 198 199 200 201 202 203 204 205 206 207 208 209

``/2/redistribute-config``
++++++++++++++++++++++++++

Redistribute configuration to all nodes.

It supports the following commands: ``PUT``.

``PUT``
~~~~~~~

Redistribute configuration to all nodes. The result will be a job id.


Iustin Pop's avatar
Iustin Pop committed
210 211
``/2/instances``
++++++++++++++++
212

Iustin Pop's avatar
Iustin Pop committed
213
The instances resource.
214

Iustin Pop's avatar
Iustin Pop committed
215
It supports the following commands: ``GET``, ``POST``.
216

Iustin Pop's avatar
Iustin Pop committed
217 218
``GET``
~~~~~~~
219

Iustin Pop's avatar
Iustin Pop committed
220
Returns a list of all available instances.
221

Iustin Pop's avatar
Iustin Pop committed
222
Example::
223 224 225 226 227 228 229 230 231 232 233 234

    [
      {
        "name": "web.example.com",
        "uri": "\/instances\/web.example.com"
      },
      {
        "name": "mail.example.com",
        "uri": "\/instances\/mail.example.com"
      }
    ]

Iustin Pop's avatar
Iustin Pop committed
235 236 237
If the optional *bulk* argument is provided and set to a true value (i.e
``?bulk=1``), the output contains detailed information about instances
as a list.
238

Iustin Pop's avatar
Iustin Pop committed
239
Example::
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268

    [
      {
         "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
      },
      ...
    ]


Iustin Pop's avatar
Iustin Pop committed
269 270
``POST``
~~~~~~~~
271

Iustin Pop's avatar
Iustin Pop committed
272
Creates an instance.
273

274 275
If the optional *dry-run* argument is provided and set to a positive
integer valu (e.g. ``?dry-run=1``), the job will not be actually
Iustin Pop's avatar
Iustin Pop committed
276 277 278
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.
279

Iustin Pop's avatar
Iustin Pop committed
280
Returns: a job ID that can be used later for polling.
281

Iustin Pop's avatar
Iustin Pop committed
282 283
``/2/instances/[instance_name]``
++++++++++++++++++++++++++++++++
284

Iustin Pop's avatar
Iustin Pop committed
285
Instance-specific resource.
286

Iustin Pop's avatar
Iustin Pop committed
287
It supports the following commands: ``GET``, ``DELETE``.
288

Iustin Pop's avatar
Iustin Pop committed
289 290
``GET``
~~~~~~~
291

Iustin Pop's avatar
Iustin Pop committed
292 293
Returns information about an instance, similar to the bulk output from
the instance list.
294

Iustin Pop's avatar
Iustin Pop committed
295 296
``DELETE``
~~~~~~~~~~
297

Iustin Pop's avatar
Iustin Pop committed
298
Deletes an instance.
299

300 301
It supports the ``dry-run`` argument.

302

303 304 305 306 307 308 309 310 311 312
``/2/instances/[instance_name]/info``
+++++++++++++++++++++++++++++++++++++++

It supports the following commands: ``GET``.

``GET``
~~~~~~~

Requests detailed information about the instance. An optional parameter,
``static`` (bool), can be set to return only static information from the
313 314
configuration without querying the instance's nodes. The result will be
a job id.
315 316


Iustin Pop's avatar
Iustin Pop committed
317 318
``/2/instances/[instance_name]/reboot``
+++++++++++++++++++++++++++++++++++++++
319

Iustin Pop's avatar
Iustin Pop committed
320
Reboots URI for an instance.
321

Iustin Pop's avatar
Iustin Pop committed
322
It supports the following commands: ``POST``.
323

Iustin Pop's avatar
Iustin Pop committed
324 325
``POST``
~~~~~~~~
326

Iustin Pop's avatar
Iustin Pop committed
327
Reboots the instance.
328

Iustin Pop's avatar
Iustin Pop committed
329 330
The URI takes optional ``type=hard|soft|full`` and
``ignore_secondaries=False|True`` parameters.
331

332 333 334
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
335 336
``/2/instances/[instance_name]/shutdown``
+++++++++++++++++++++++++++++++++++++++++
337

Iustin Pop's avatar
Iustin Pop committed
338
Instance shutdown URI.
339

Iustin Pop's avatar
Iustin Pop committed
340
It supports the following commands: ``PUT``.
341

Iustin Pop's avatar
Iustin Pop committed
342 343
``PUT``
~~~~~~~
344

Iustin Pop's avatar
Iustin Pop committed
345
Shutdowns an instance.
346

347 348
It supports the ``dry-run`` argument.

349

Iustin Pop's avatar
Iustin Pop committed
350 351
``/2/instances/[instance_name]/startup``
++++++++++++++++++++++++++++++++++++++++
352

Iustin Pop's avatar
Iustin Pop committed
353
Instance startup URI.
354

Iustin Pop's avatar
Iustin Pop committed
355
It supports the following commands: ``PUT``.
356

Iustin Pop's avatar
Iustin Pop committed
357 358
``PUT``
~~~~~~~
359

Iustin Pop's avatar
Iustin Pop committed
360
Startup an instance.
361

Iustin Pop's avatar
Iustin Pop committed
362 363
The URI takes an optional ``force=False|True`` parameter to start the
instance if even if secondary disks are failing.
364

365 366
It supports the ``dry-run`` argument.

367 368 369 370 371 372 373 374 375 376 377 378
``/2/instances/[instance_name]/reinstall``
++++++++++++++++++++++++++++++++++++++++++++++

Installs the operating system again.

It supports the following commands: ``POST``.

``POST``
~~~~~~~~

Takes the parameters ``os`` (OS template name) and ``nostartup`` (bool).

379

380 381 382 383 384 385 386 387 388 389 390
``/2/instances/[instance_name]/replace-disks``
++++++++++++++++++++++++++++++++++++++++++++++

Replaces disks on an instance.

It supports the following commands: ``POST``.

``POST``
~~~~~~~~

Takes the parameters ``mode`` (one of ``replace_on_primary``,
391 392 393
``replace_on_secondary``, ``replace_new_secondary`` or
``replace_auto``), ``disks`` (comma separated list of disk indexes),
``remote_node`` and ``iallocator``.
394 395


Iustin Pop's avatar
Iustin Pop committed
396 397
``/2/instances/[instance_name]/tags``
+++++++++++++++++++++++++++++++++++++
398

Iustin Pop's avatar
Iustin Pop committed
399
Manages per-instance tags.
400

Iustin Pop's avatar
Iustin Pop committed
401
It supports the following commands: ``GET``, ``PUT``, ``DELETE``.
402

Iustin Pop's avatar
Iustin Pop committed
403 404
``GET``
~~~~~~~
405

Iustin Pop's avatar
Iustin Pop committed
406
Returns a list of tags.
407

Iustin Pop's avatar
Iustin Pop committed
408
Example::
409

Iustin Pop's avatar
Iustin Pop committed
410
    ["tag1", "tag2", "tag3"]
411

Iustin Pop's avatar
Iustin Pop committed
412 413
``PUT``
~~~~~~~
414

Iustin Pop's avatar
Iustin Pop committed
415
Add a set of tags.
416

Iustin Pop's avatar
Iustin Pop committed
417
The request as a list of strings should be ``PUT`` to this URI. The
418
result will be a job id.
419

420 421 422
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
423 424
``DELETE``
~~~~~~~~~~
425

Iustin Pop's avatar
Iustin Pop committed
426
Delete a tag.
427

Iustin Pop's avatar
Iustin Pop committed
428 429
In order to delete a set of tags, the DELETE request should be addressed
to URI like::
430

Iustin Pop's avatar
Iustin Pop committed
431
    /tags?tag=[tag]&tag=[tag]
432

433 434 435
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
436 437
``/2/jobs``
+++++++++++
438

Iustin Pop's avatar
Iustin Pop committed
439
The ``/2/jobs`` resource.
440

Iustin Pop's avatar
Iustin Pop committed
441
It supports the following commands: ``GET``.
442

Iustin Pop's avatar
Iustin Pop committed
443 444
``GET``
~~~~~~~
445

Iustin Pop's avatar
Iustin Pop committed
446
Returns a dictionary of jobs.
447

Iustin Pop's avatar
Iustin Pop committed
448
Returns: a dictionary with jobs id and uri.
449

Iustin Pop's avatar
Iustin Pop committed
450 451
``/2/jobs/[job_id]``
++++++++++++++++++++
452 453


Iustin Pop's avatar
Iustin Pop committed
454
Individual job URI.
455

Iustin Pop's avatar
Iustin Pop committed
456
It supports the following commands: ``GET``, ``DELETE``.
457

Iustin Pop's avatar
Iustin Pop committed
458 459
``GET``
~~~~~~~
460

Iustin Pop's avatar
Iustin Pop committed
461
Returns a job status.
462

Iustin Pop's avatar
Iustin Pop committed
463
Returns: a dictionary with job parameters.
464

Iustin Pop's avatar
Iustin Pop committed
465
The result includes:
466

Iustin Pop's avatar
Iustin Pop committed
467 468
- id: job ID as a number
- status: current job status as a string
Iustin Pop's avatar
Iustin Pop committed
469 470
- ops: involved OpCodes as a list of dictionaries for each opcodes in
  the job
Iustin Pop's avatar
Iustin Pop committed
471 472
- opstatus: OpCodes status as a list
- opresult: OpCodes results as a list of lists
473

Iustin Pop's avatar
Iustin Pop committed
474 475
``DELETE``
~~~~~~~~~~
476

Iustin Pop's avatar
Iustin Pop committed
477
Cancel a not-yet-started job.
478

Iustin Pop's avatar
Iustin Pop committed
479 480
``/2/nodes``
++++++++++++
481

Iustin Pop's avatar
Iustin Pop committed
482
Nodes resource.
483

Iustin Pop's avatar
Iustin Pop committed
484
It supports the following commands: ``GET``.
485

Iustin Pop's avatar
Iustin Pop committed
486 487
``GET``
~~~~~~~
488

Iustin Pop's avatar
Iustin Pop committed
489
Returns a list of all nodes.
490

Iustin Pop's avatar
Iustin Pop committed
491
Example::
492 493 494 495 496 497 498 499 500 501 502 503

    [
      {
        "id": "node1.example.com",
        "uri": "\/instances\/node1.example.com"
      },
      {
        "id": "node2.example.com",
        "uri": "\/instances\/node2.example.com"
      }
    ]

Iustin Pop's avatar
Iustin Pop committed
504 505 506
If the optional 'bulk' argument is provided and set to 'true' value (i.e
'?bulk=1'), the output contains detailed information about nodes as a
list.
507

Iustin Pop's avatar
Iustin Pop committed
508
Example::
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525

    [
      {
        "pinst_cnt": 1,
        "mfree": 31280,
        "mtotal": 32763,
        "name": "www.example.com",
        "tags": [],
        "mnode": 512,
        "dtotal": 5246208,
        "sinst_cnt": 2,
        "dfree": 5171712,
        "offline": false
      },
      ...
    ]

526 527 528 529 530 531 532
``/2/nodes/[node_name]``
+++++++++++++++++++++++++++++++++

Returns information about a node.

It supports the following commands: ``GET``.

533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
``/2/nodes/[node_name]/evacuate``
+++++++++++++++++++++++++++++++++

Evacuates all secondary instances off a node.

It supports the following commands: ``POST``.

``POST``
~~~~~~~~

To evacuate a node, either one of the ``iallocator`` or ``remote_node``
parameters must be passed:

    evacuate?iallocator=[iallocator]
    evacuate?remote_node=[nodeX.example.com]

549 550 551 552 553 554 555 556 557 558 559 560 561 562
``/2/nodes/[node_name]/migrate``
+++++++++++++++++++++++++++++++++

Migrates all primary instances from a node.

It supports the following commands: ``POST``.

``POST``
~~~~~~~~

No parameters are required, but ``live`` can be set to a boolean value.

    migrate?live=[0|1]

563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
``/2/nodes/[node_name]/role``
+++++++++++++++++++++++++++++

Manages node role.

It supports the following commands: ``GET``, ``PUT``.

The role is always one of the following:

  - drained
  - master
  - master-candidate
  - offline
  - regular

``GET``
~~~~~~~

Returns the current node role.

Example::

    "master-candidate"

``PUT``
~~~~~~~

Change the node role.

592 593
The request is a string which should be PUT to this URI. The result will
be a job id.
594 595 596

It supports the ``force`` argument.

597 598 599 600 601 602 603 604 605 606
``/2/nodes/[node_name]/storage``
++++++++++++++++++++++++++++++++

Manages storage units on the node.

``GET``
~~~~~~~

Requests a list of storage units on a node. Requires the parameters
``storage_type`` (one of ``file``, ``lvm-pv`` or ``lvm-vg``) and
607 608
``output_fields``. The result will be a job id, using which the result
can be retrieved.
609

610 611 612 613 614 615 616 617
``/2/nodes/[node_name]/storage/modify``
+++++++++++++++++++++++++++++++++++++++

Modifies storage units on the node.

``PUT``
~~~~~~~

618 619 620 621 622
Modifies parameters of storage units on the node. Requires the
parameters ``storage_type`` (one of ``file``, ``lvm-pv`` or ``lvm-vg``)
and ``name`` (name of the storage unit).  Parameters can be passed
additionally. Currently only ``allocatable`` (bool) is supported. The
result will be a job id.
623

624 625 626 627 628 629 630 631
``/2/nodes/[node_name]/storage/repair``
+++++++++++++++++++++++++++++++++++++++

Repairs a storage unit on the node.

``PUT``
~~~~~~~

632 633 634
Repairs a storage unit on the node. Requires the parameters
``storage_type`` (currently only ``lvm-vg`` can be repaired) and
``name`` (name of the storage unit). The result will be a job id.
635

Iustin Pop's avatar
Iustin Pop committed
636 637
``/2/nodes/[node_name]/tags``
+++++++++++++++++++++++++++++
638

Iustin Pop's avatar
Iustin Pop committed
639
Manages per-node tags.
640

Iustin Pop's avatar
Iustin Pop committed
641
It supports the following commands: ``GET``, ``PUT``, ``DELETE``.
642

Iustin Pop's avatar
Iustin Pop committed
643 644
``GET``
~~~~~~~
645

Iustin Pop's avatar
Iustin Pop committed
646
Returns a list of tags.
647

Iustin Pop's avatar
Iustin Pop committed
648
Example::
649

Iustin Pop's avatar
Iustin Pop committed
650
    ["tag1", "tag2", "tag3"]
651

Iustin Pop's avatar
Iustin Pop committed
652 653
``PUT``
~~~~~~~
654

Iustin Pop's avatar
Iustin Pop committed
655
Add a set of tags.
656

Iustin Pop's avatar
Iustin Pop committed
657 658
The request as a list of strings should be PUT to this URI. The result
will be a job id.
659

660 661
It supports the ``dry-run`` argument.

Iustin Pop's avatar
Iustin Pop committed
662 663
``DELETE``
~~~~~~~~~~
664

Iustin Pop's avatar
Iustin Pop committed
665
Deletes tags.
666

Iustin Pop's avatar
Iustin Pop committed
667 668
In order to delete a set of tags, the DELETE request should be addressed
to URI like::
669

Iustin Pop's avatar
Iustin Pop committed
670
    /tags?tag=[tag]&tag=[tag]
671

672 673 674
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
675 676
``/2/os``
+++++++++
677

Iustin Pop's avatar
Iustin Pop committed
678
OS resource.
679

Iustin Pop's avatar
Iustin Pop committed
680
It supports the following commands: ``GET``.
681

Iustin Pop's avatar
Iustin Pop committed
682 683
``GET``
~~~~~~~
684

Iustin Pop's avatar
Iustin Pop committed
685
Return a list of all OSes.
686

Iustin Pop's avatar
Iustin Pop committed
687
Can return error 500 in case of a problem. Since this is a costly
Iustin Pop's avatar
Iustin Pop committed
688
operation for Ganeti 2.0, it is not recommended to execute it too often.
689

Iustin Pop's avatar
Iustin Pop committed
690
Example::
691

Iustin Pop's avatar
Iustin Pop committed
692
    ["debian-etch"]
693

Iustin Pop's avatar
Iustin Pop committed
694 695
``/2/tags``
+++++++++++
696

Iustin Pop's avatar
Iustin Pop committed
697
Manages cluster tags.
698

Iustin Pop's avatar
Iustin Pop committed
699
It supports the following commands: ``GET``, ``PUT``, ``DELETE``.
700

Iustin Pop's avatar
Iustin Pop committed
701 702
``GET``
~~~~~~~
703

Iustin Pop's avatar
Iustin Pop committed
704
Returns the cluster tags.
705

Iustin Pop's avatar
Iustin Pop committed
706
Example::
707

Iustin Pop's avatar
Iustin Pop committed
708
    ["tag1", "tag2", "tag3"]
709

Iustin Pop's avatar
Iustin Pop committed
710 711
``PUT``
~~~~~~~
712

Iustin Pop's avatar
Iustin Pop committed
713
Adds a set of tags.
714

Iustin Pop's avatar
Iustin Pop committed
715 716
The request as a list of strings should be PUT to this URI. The result
will be a job id.
717

718 719 720
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
721 722
``DELETE``
~~~~~~~~~~
723

Iustin Pop's avatar
Iustin Pop committed
724
Deletes tags.
725

Iustin Pop's avatar
Iustin Pop committed
726 727
In order to delete a set of tags, the DELETE request should be addressed
to URI like::
728

Iustin Pop's avatar
Iustin Pop committed
729
    /tags?tag=[tag]&tag=[tag]
730

731 732 733
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
734 735
``/version``
++++++++++++
736

Iustin Pop's avatar
Iustin Pop committed
737
The version resource.
738

Iustin Pop's avatar
Iustin Pop committed
739 740
This resource should be used to determine the remote API version and to
adapt clients accordingly.
741

Iustin Pop's avatar
Iustin Pop committed
742
It supports the following commands: ``GET``.
743

Iustin Pop's avatar
Iustin Pop committed
744 745
``GET``
~~~~~~~
746

Iustin Pop's avatar
Iustin Pop committed
747 748
Returns the remote API version. Ganeti 1.2 returned ``1`` and Ganeti 2.0
returns ``2``.
749 750

.. vim: set textwidth=72 :
Iustin Pop's avatar
Iustin Pop committed
751 752 753 754
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: