Action Virtual Network Appliance

Summary

Action Virtual Network Appliance.

Type

  • Action

Synchronous/Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • POST

HTTP Request Path

{api_endpoint}/v1.0/virtual_network_appliances/{virtual_network_appliance_id}/action

HTTP Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>
X-VNA-Request-Id: <request_id>

Note

  • You can set the request_id for a specific request.
  • The request_id is unique for each tenant.
  • If you make the request again with the same Path and the same method and the same request_id, the request is ignored and you can receive a response similar to show virtual_network_appliance at the current time.
  • For example, when you failed to receive a response after requested, you can confirm whether the request succeeded or failed by requesting again with the same request_id. Also, this prevents duplicate execution of requests.

HTTP Request Body

Parameters

Input Parameters
name style datatype format description required/optional default value action for invalid parameter response code for invalid parameter
token_id Header String Non-Hyph-uuid keystone authentication token required   Terminate 401
request_id Header String Hyph-uuid A request_id to identify requests. optional   Terminate 400
virtual_network_appliance_id URL String Hyph-uuid ID of the Virtual_Network_Appliance required   Terminate 400
os-start Body None - The action to start a server. optional   Terminate 400
os-stop Body None - The action to stop a server. optional   Terminate 400
os-restart Body None - The action to restart a server. optional   Terminate 400

Note

  • One of either os-start, os-stop or os-restart is required.

Response

Response Header

Format

HTTP/1.1 <response_code> <message>       (ex. 200 OK)
  • <response_code>: see “HTTP Responses” section
  • <message>: message based on the response code

Response Code

Response Codes
response code condition
200 OK
400 Bad Request
401 Unauthorized
404 Not Found
409 Conflicted
500 Internal Server Error

Response Body

Format

No item.

Parameters

No item.

Sample Request and Response

Sample API Request

Request URI

https://{api_endpoint}/v1.0/virtual_network_appliances/{virtual_network_appliance_id}/action

Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: 69105c889f824efdafb56af224208ad4

Request Body

{
  "os-start": null
}

Sample API Response

Response Header

HTTP/1.1 200 OK

Response Body

This operation does not send a request body.

Example Error Message

HTTP Request

POST /v1.0/virtual_network_appliances/{virtual_network_appliance_id}/action HTTP/1.1
User-Agent: curl/7.51.0
Host: 10.1.131.140
Accept:application/json
X-Auth-Token:4e54395a12b740d585d74190ba4eb14b
Content-Type: application/json

HTTP Response

HTTP/1.1 400 Bad Request
Server: nginx
Date: Wed, 07 Feb 2018 06:49:20 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 49
Connection: keep-alive

{
    "message": "required parameter is not entered."
}