This file documents the vSwitch RESTful API in detail.
Each vSwitch API call has an entry containing:
- an HTTP method(i.e. POST or GET), an URL path, and a possible
<parameters>
as arguments. - A summary of the response body for a successful request.
- Reported error code.
Normally, error codes vSwitch may reponse are:
- 400 if mal-formatted.
- 404 if the api call references an object that does not exist.
POST /signup
Request body:
{
email: "<email>",
password: "<password>",
confirmPassword: "<confirmPassword>",
name: "<name>",
lastname: "<lastname>"
}
This api call will create a new user, which is the first step to use Cloud vSwitch.
Authorization requirements:
- No special access.
Possible errors:
- 409 if:
- already exists.
- does not match .
- is not email address formatted.
POST /login
Request body:
{
email: "<email>",
password: "<password>"
}
User login. This api call allows user login and manipulate the resources in the setup cloud environment.
Authorization requirements:
- No special access.
Possible errors:
- 409 if
- not exits.
- not match.
GET /user/user_id
Get user profile. This api call will retrieve the user profile.
Authorization requirements:
- No special access.
Possible errors:
- 404 if user not exists.
PUT /user/user_id
Update user. User use this api call to update his information.
Authorization requirements:
- No special access.
Possible errors:
- 404 if user not exists.
GET /user/:id/organizations
View details about organizations that current user is in.
Authorization requirements:
- No special access.
POST /invite
Request body:
{
email: [],
password: "<password>"
}
User invite. This api call will invite another user to join this organization.
Authorization requirements:
- No special access.
Possible errors:
- not match.
POST /organization
Request body:
{
name: "<name>",
ou: "<ou>",
email: "<email>",
country: "<country>",
province: "<province>",
city: "<city>"
}
Organization create.
Authorization requirements:
- No special access.
Possible errors:
- 409 if the name of this organization already exists.
POST /organization/:id/members/:user
Organization add member.
Authorization requirements:
- No special access.
DELETE /organization/:id/members/:user
Organization delete member.
Authorization requirements:
- No special access.
DELETE /organization/:id
Organization delete. This api call will delete this organization.
Authorization requirements:
- Ownership required.
Possible errors:
- 409 if not creator of this organization.
GET /organization/:id
View the information about this organization.
Authorization requirements:
- No special access.
PUT /organization/:id
Request body:
{
name: "<name>",
ou: "<ou>",
email: "<email>",
country: "<country>",
province: "<province>",
city: "<city>"
}
Authorization requirements:
- Ownership of this of this organization required.
Possible errors:
- 409 if already exists.
GET /organization/:id/details
Authorization requirements:
- Membership of the organization is required.
Possible errors:
- 404 no details about the organization.
POST /instance
Request body:
{
name: "<name>"
}
Authorization requirements:
- No special access.
Possible errors:
- 409 if already exists.
POST /organization/:id/instance/:id
Authorization requirements:
- No special access.
Possible errors:
- 409 if already exists.
PUT /instance/:id
Request body:
{
name: "<name>"
}
Authorization requirements:
- No special access.
Possible errors:
- 409 if already exists.
POST /instance/start
Request body:
{
id: "<id>"
}
Authorization requirements:
- No special access.
Possible errors:
- 404 if not exists.
GET /organization/:id/instances
Authorization requirements:
- No special access.
Possible errors:
- 404 if not exists.
POST /instance/stop
Request body:
{
id: "<id>"
}
Authorization requirements:
- No special access.
Possible errors:
- 404 if not exists.
DELETE /instance/:id
Authorization requirements:
- No special access.
Possible errors:
- 404 if not exists.
GET /images
Authorization requirements:
- No special access.
Possible errors:
- 404 if no images exist.
GET /flavors
Authorization requirements:
- No special access.
Possible errors:
- 404 if no exist.