blazar/doc/source/restapi/rest_api_v2.rst
Masahito Muroi 68d769bf71 Migrate climate namespace to blazar
Although the Climate project was renamed to Blazar in 2014, the code has
still been using the climate namespace.

This patch moves all code to the blazar directory and allows users and
operators to use the 'blazar' command namespace. The 'climate' namespace
remains O release to allow users of Blazar time to move their own
code to the blazar namespace, but will be removed in P release
development cycle.

Change-Id: Icbe6fab1051aae4ac819982a1fa4f323cb0bf2d0
Partial-Bug: #1662734
2017-03-02 09:36:14 +00:00

1.4 KiB

Blazar REST API v2

1 General API information

This section contains base information about the Blazar REST API design, including operations with different Blazar resource types and examples of possible requests and responses. Blazar supports JSON data serialization format, which means that requests with non empty body have to contain "application/json" Content-Type header or it should be added ".json" extension to the resource name in the request.

This should look like the following:

GET /v2/leases.json

or

GET /v2/leases
Accept: application/json

2 Leases =======

Description

Lease is the main abstraction for the user in the Blazar case. Lease means some kind of contract where start time, end time and resources to be reserved are mentioned.

blazar.api.v2.controllers.extensions.lease:LeasesController

blazar.api.v2.controllers.extensions.lease.Lease

3 Hosts

Description

Host is the abstraction for a computehost in the Blazar case. Host means a specific type of resource to be allocated.

blazar.api.v2.controllers.extensions.host:HostsController

blazar.api.v2.controllers.extensions.host.Host