rapi.rst 14.2 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

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

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.

``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.

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.

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 63 64 65 66 67 68
Usage examples
--------------

You can access the API using your favorite programming language as
long as it supports network connections.

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
.. highlight: python
84 85

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


JavaScript
++++++++++

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

Iustin Pop's avatar
Iustin Pop committed
98 99
.. highlight:: javascript

100 101
::

Tim Boring's avatar
Tim Boring committed
102
  var url = 'https://CLUSTERNAME:5080/2/info';
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
  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
121
.. highlight:: javascript
122

Iustin Pop's avatar
Iustin Pop committed
123 124
``/``
+++++
125

Iustin Pop's avatar
Iustin Pop committed
126
The root resource.
127

Iustin Pop's avatar
Iustin Pop committed
128
It supports the following commands: ``GET``.
129

Iustin Pop's avatar
Iustin Pop committed
130 131
``GET``
~~~~~~~
132

Iustin Pop's avatar
Iustin Pop committed
133
Shows the list of mapped resources.
134

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

Iustin Pop's avatar
Iustin Pop committed
137 138
``/2``
++++++
139

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

Iustin Pop's avatar
Iustin Pop committed
142
It supports the following commands: ``GET``.
143

Iustin Pop's avatar
Iustin Pop committed
144 145
``GET``
~~~~~~~
146

Iustin Pop's avatar
Iustin Pop committed
147
Show the list of mapped resources.
148

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

Iustin Pop's avatar
Iustin Pop committed
151 152
``/2/info``
+++++++++++
153

Iustin Pop's avatar
Iustin Pop committed
154
Cluster information resource.
155

Iustin Pop's avatar
Iustin Pop committed
156
It supports the following commands: ``GET``.
157

Iustin Pop's avatar
Iustin Pop committed
158 159
``GET``
~~~~~~~
160

Iustin Pop's avatar
Iustin Pop committed
161
Returns cluster information.
162

Iustin Pop's avatar
Iustin Pop committed
163
Example::
164 165 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

  {
    "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
       }
      }
    }

194 195 196 197 198 199 200 201 202 203 204 205 206 207

``/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
208 209
``/2/instances``
++++++++++++++++
210

Iustin Pop's avatar
Iustin Pop committed
211
The instances resource.
212

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

Iustin Pop's avatar
Iustin Pop committed
215 216
``GET``
~~~~~~~
217

Iustin Pop's avatar
Iustin Pop committed
218
Returns a list of all available instances.
219

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

    [
      {
        "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
233 234 235
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.
236

Iustin Pop's avatar
Iustin Pop committed
237
Example::
238 239 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

    [
      {
         "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
267 268
``POST``
~~~~~~~~
269

Iustin Pop's avatar
Iustin Pop committed
270
Creates an instance.
271

272 273 274 275 276 277
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
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.

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

Iustin Pop's avatar
Iustin Pop committed
280 281
``/2/instances/[instance_name]``
++++++++++++++++++++++++++++++++
282

Iustin Pop's avatar
Iustin Pop committed
283
Instance-specific resource.
284

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

Iustin Pop's avatar
Iustin Pop committed
287 288
``GET``
~~~~~~~
289

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

Iustin Pop's avatar
Iustin Pop committed
293 294
``DELETE``
~~~~~~~~~~
295

Iustin Pop's avatar
Iustin Pop committed
296
Deletes an instance.
297

298 299
It supports the ``dry-run`` argument.

300

301 302 303 304 305 306 307 308 309 310
``/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
311 312
configuration without querying the instance's nodes. The result will be
a job id.
313 314


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

Iustin Pop's avatar
Iustin Pop committed
318
Reboots URI for an instance.
319

Iustin Pop's avatar
Iustin Pop committed
320
It supports the following commands: ``POST``.
321

Iustin Pop's avatar
Iustin Pop committed
322 323
``POST``
~~~~~~~~
324

Iustin Pop's avatar
Iustin Pop committed
325
Reboots the instance.
326

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

330 331 332
It supports the ``dry-run`` argument.


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

Iustin Pop's avatar
Iustin Pop committed
336
Instance shutdown URI.
337

Iustin Pop's avatar
Iustin Pop committed
338
It supports the following commands: ``PUT``.
339

Iustin Pop's avatar
Iustin Pop committed
340 341
``PUT``
~~~~~~~
342

Iustin Pop's avatar
Iustin Pop committed
343
Shutdowns an instance.
344

345 346
It supports the ``dry-run`` argument.

347

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

Iustin Pop's avatar
Iustin Pop committed
351
Instance startup URI.
352

Iustin Pop's avatar
Iustin Pop committed
353
It supports the following commands: ``PUT``.
354

Iustin Pop's avatar
Iustin Pop committed
355 356
``PUT``
~~~~~~~
357

Iustin Pop's avatar
Iustin Pop committed
358
Startup an instance.
359

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

363 364
It supports the ``dry-run`` argument.

365 366 367 368 369 370 371 372 373 374 375 376
``/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).

377

378 379 380 381 382 383 384 385 386 387 388
``/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``,
389 390 391
``replace_on_secondary``, ``replace_new_secondary`` or
``replace_auto``), ``disks`` (comma separated list of disk indexes),
``remote_node`` and ``iallocator``.
392 393


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

Iustin Pop's avatar
Iustin Pop committed
397
Manages per-instance tags.
398

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

Iustin Pop's avatar
Iustin Pop committed
401 402
``GET``
~~~~~~~
403

Iustin Pop's avatar
Iustin Pop committed
404
Returns a list of tags.
405

Iustin Pop's avatar
Iustin Pop committed
406
Example::
407

Iustin Pop's avatar
Iustin Pop committed
408
    ["tag1", "tag2", "tag3"]
409

Iustin Pop's avatar
Iustin Pop committed
410 411
``PUT``
~~~~~~~
412

Iustin Pop's avatar
Iustin Pop committed
413
Add a set of tags.
414

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

418 419 420
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
421 422
``DELETE``
~~~~~~~~~~
423

Iustin Pop's avatar
Iustin Pop committed
424
Delete a tag.
425

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

Iustin Pop's avatar
Iustin Pop committed
429
    /tags?tag=[tag]&tag=[tag]
430

431 432 433
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
434 435
``/2/jobs``
+++++++++++
436

Iustin Pop's avatar
Iustin Pop committed
437
The ``/2/jobs`` resource.
438

Iustin Pop's avatar
Iustin Pop committed
439
It supports the following commands: ``GET``.
440

Iustin Pop's avatar
Iustin Pop committed
441 442
``GET``
~~~~~~~
443

Iustin Pop's avatar
Iustin Pop committed
444
Returns a dictionary of jobs.
445

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

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


Iustin Pop's avatar
Iustin Pop committed
452
Individual job URI.
453

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

Iustin Pop's avatar
Iustin Pop committed
456 457
``GET``
~~~~~~~
458

Iustin Pop's avatar
Iustin Pop committed
459
Returns a job status.
460

Iustin Pop's avatar
Iustin Pop committed
461
Returns: a dictionary with job parameters.
462

Iustin Pop's avatar
Iustin Pop committed
463
The result includes:
464

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

Iustin Pop's avatar
Iustin Pop committed
472 473
``DELETE``
~~~~~~~~~~
474

Iustin Pop's avatar
Iustin Pop committed
475
Cancel a not-yet-started job.
476

Iustin Pop's avatar
Iustin Pop committed
477 478
``/2/nodes``
++++++++++++
479

Iustin Pop's avatar
Iustin Pop committed
480
Nodes resource.
481

Iustin Pop's avatar
Iustin Pop committed
482
It supports the following commands: ``GET``.
483

Iustin Pop's avatar
Iustin Pop committed
484 485
``GET``
~~~~~~~
486

Iustin Pop's avatar
Iustin Pop committed
487
Returns a list of all nodes.
488

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

    [
      {
        "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
502 503 504
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.
505

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

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

524 525 526 527 528 529 530
``/2/nodes/[node_name]``
+++++++++++++++++++++++++++++++++

Returns information about a node.

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

531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
``/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]

547 548 549 550 551 552 553 554 555 556 557 558 559 560
``/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]

561 562 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
``/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.

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

It supports the ``force`` argument.

595 596 597 598 599 600 601 602 603 604
``/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
605 606
``output_fields``. The result will be a job id, using which the result
can be retrieved.
607

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

Modifies storage units on the node.

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

616 617 618 619 620
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.
621

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

Repairs a storage unit on the node.

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

630 631 632
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.
633

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

Iustin Pop's avatar
Iustin Pop committed
637
Manages per-node tags.
638

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

Iustin Pop's avatar
Iustin Pop committed
641 642
``GET``
~~~~~~~
643

Iustin Pop's avatar
Iustin Pop committed
644
Returns a list of tags.
645

Iustin Pop's avatar
Iustin Pop committed
646
Example::
647

Iustin Pop's avatar
Iustin Pop committed
648
    ["tag1", "tag2", "tag3"]
649

Iustin Pop's avatar
Iustin Pop committed
650 651
``PUT``
~~~~~~~
652

Iustin Pop's avatar
Iustin Pop committed
653
Add a set of tags.
654

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

658 659
It supports the ``dry-run`` argument.

Iustin Pop's avatar
Iustin Pop committed
660 661
``DELETE``
~~~~~~~~~~
662

Iustin Pop's avatar
Iustin Pop committed
663
Deletes tags.
664

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

Iustin Pop's avatar
Iustin Pop committed
668
    /tags?tag=[tag]&tag=[tag]
669

670 671 672
It supports the ``dry-run`` argument.


Iustin Pop's avatar
Iustin Pop committed
673 674
``/2/os``
+++++++++
675

Iustin Pop's avatar
Iustin Pop committed
676
OS resource.
677

Iustin Pop's avatar
Iustin Pop committed
678
It supports the following commands: ``GET``.
679

Iustin Pop's avatar
Iustin Pop committed
680 681
``GET``
~~~~~~~
682

Iustin Pop's avatar
Iustin Pop committed
683
Return a list of all OSes.
684

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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


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

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

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

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

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

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

.. vim: set textwidth=72 :