Administration API

For access to the OneView API simply type the URL of your OneView server followed by /api

/api

Eg.

https://oneview.my.net/api

A

Eg.
https://oneview.my.net/api

Via this link you are presented with the OneView API with function descriptions and help functionality.

With the release of version 5.1 you are furthermore provided with a few examples of how to use the API from the directory doc/api on your OneView Server installation.

URL Syntax

All API functions can be reached through the following URL construction:

/api/[user|admin|setup|dashboard]/<API-function>

Eg.

https://oneview.my.net/api/admin/createSystem

Authentication

Every API request must either include an “Authorization” HTTP header or a session cookie received from a previous API HTTP request resulting in a succesful authentication.

The API supports BASIC authentication only.

Userids and passwords are maintained in the Oneview web interface as any other Oneview user.

Authorization

Use of the Oneview Admin API requires an OneView userid with the the relevant user role, for example Administrator.

User roles are maintained in the Oneview web interface as with any other Oneview user.

Request Syntax

Any request parameters are passed in the request body for POST-requests or as query parameters in GET-requests.

The content type for POST-requests must be either “application/json” or ”application/x-www-form-urlencoded”.

POST Example

POST /api/admin/<API-function> HTTP/1.1
Host: oneview.my.net
Content-Type: application/json; charset=utf-8
Authorization: Basic xxxxxxxxxxx

{
  parameter1: "value1",
  parameter2: "value2",
  ....
  parameterN: "valueN"
}

GET Example

GET /api/admin/<API-function>?parameter1=value1&parameter2=value2 HTTP/1.1
Host: oneview.my.net
Authorization: Basic xxxxxxxxxxx

Response Syntax

All responses are returned in JSON-format.

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  name1: object1,
  name2: object2,
  ....
  nameN: objectN
}