Server

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(JSON)
m (1 revision: Release 98)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
This article describes operations for getting details of servers, along with updating and deleting servers in your account.
 +
Other types of operations on a server are: [[ServerCreate]], [[ServerActions]], etc.
 +
 +
='''GET''' /accounts/''{accountId}''/flexcloud/servers/''{id}''=
 
This operation will return details of a single server.
 
This operation will return details of a single server.
 
='''GET''' /servers/'''id'''=
 
Get details of a single server.
 
  
 
== Parameters ==
 
== Parameters ==
 +
; accountId - ''string''
 +
: The selected account Id.
 +
 
; id - ''string''
 
; id - ''string''
 
: Id of the server to get.
 
: Id of the server to get.
Line 10: Line 14:
 
== Result ==
 
== Result ==
 
=== JSON ===
 
=== JSON ===
<big><source lang="javascript">
+
<nowiki>
 
{
 
{
 
   "server":{
 
   "server":{
Line 32: Line 36:
 
       "links":[
 
       "links":[
 
         {
 
         {
             "href":"http://{api_server}/servers/{server_id}/",
+
             "href":"http://{api_server}/accounts/{accountId}/flexcloud/servers/{server_id}/",
 
             "rel":"self"
 
             "rel":"self"
 
         }
 
         }
Line 40: Line 44:
 
         "links":[
 
         "links":[
 
             {
 
             {
               "href":"http://{api_server}/images/{image_id}/",
+
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/images/{image_id}/",
 
               "rel":"self"
 
               "rel":"self"
 
             }
 
             }
Line 51: Line 55:
 
         "links":[
 
         "links":[
 
             {
 
             {
               "href":"http://{api_server}/flavors/{flavor_id}/",
+
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/flavors/{flavor_id}/",
 
               "rel":"self"
 
               "rel":"self"
 
             }
 
             }
 
         ],
 
         ],
 
         "id":3
 
         "id":3
 +
      },
 +
      "securityGroup":{
 +
        "id":"{security_group_id}",
 +
        "links":[
 +
            {
 +
              "href":"http://{server_name}/accounts/{accountId}/flexcloud/os-security-groups/{security_group_id}/",
 +
              "rel":"self"
 +
            }
 +
        ]
 
       },
 
       },
 
       "id":"{server_id}",
 
       "id":"{server_id}",
 +
      "zone": "{zone_textkey}",
 
       "name":"{display_server_name}",
 
       "name":"{display_server_name}",
 +
      "adminPass":null,
 
       "created":"2011-12-05T12:51:28",
 
       "created":"2011-12-05T12:51:28",
 
       "tenantId":null,
 
       "tenantId":null,
Line 68: Line 83:
 
       }
 
       }
 
   }
 
   }
}
+
}</nowiki>
</source></big>
+
  
 
==== server ====
 
==== server ====
Line 79: Line 93:
  
 
; status - ''string''
 
; status - ''string''
: Current state of the server. Values: '''BUILD''', '''ACTIVE''', '''SUSPENDED''', '''DELETED''', '''UNKNOWN'''
+
: Current state of the server. Values: '''BUILD''', '''ACTIVE''', '''PROCESSING''', '''SUSPENDED''', '''DELETED''', '''UNKNOWN'''
  
 
; hostId - ''string''
 
; hostId - ''string''
Line 89: Line 103:
 
; name - ''string''
 
; name - ''string''
 
: Display name for this server.
 
: Display name for this server.
 +
 +
; adminPass - ''string''
 +
: always null.
  
 
; created - ''string''
 
; created - ''string''
Line 110: Line 127:
 
; updated  
 
; updated  
 
: Unused always null.
 
: Unused always null.
 +
 +
; zone
 +
: Zone text key
  
 
==== addresses ====
 
==== addresses ====
Line 143: Line 163:
 
; flavor.id - ''string''
 
; flavor.id - ''string''
 
: Unique identifier for flavor this server is based on.
 
: Unique identifier for flavor this server is based on.
 +
 +
==== securityGroup ====
 +
; securityGroup.id - ''string''
 +
: the id of the security group that is assigned to this server
 +
 +
; securityGroup.links - ''list''
 +
: [[Hypermedia]] for the securityGroup.
  
 
== Response Codes ==
 
== Response Codes ==
Line 148: Line 175:
  
 
; Failure:
 
; Failure:
-Unauthorized (401) : This server could not verify that you are authorized to access the document you requested.  Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
+
: Unauthorized (401) : This server could not verify that you are authorized to access the document you requested.  Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
-ItemNotFound (404) : The resource requested is not found.
+
: ItemNotFound (404) : The resource requested is not found.
 
+
  
 
== Examples ==
 
== Examples ==
 
'''Successfully get server details'''
 
'''Successfully get server details'''
:'''GET''' http(s)://{api_server}/servers/test_server_0013
+
:'''GET''' http(s)://{api_server}/accounts/{accountId}/flexcloud/servers/test_server_0013
  
 
''- Request Headers:''
 
''- Request Headers:''
Line 187: Line 213:
 
           "links": [
 
           "links": [
 
             {
 
             {
                 "href": "http://{api_server}/servers/test_server_0013/",  
+
                 "href": "http://{api_server}/accounts/{accountId}/flexcloud/servers/test_server_0013/",  
 
                 "rel": "self"
 
                 "rel": "self"
 
             }
 
             }
Line 195: Line 221:
 
             "links": [
 
             "links": [
 
                 {
 
                 {
                   "href": "http://{api_server}/images/test_public_image/",  
+
                   "href": "http://{api_server}/accounts/{accountId}/flexcloud/images/test_public_image/",  
 
                   "rel": "self"
 
                   "rel": "self"
 
                 }
 
                 }
Line 201: Line 227:
 
             "id": "test_public_image"  
 
             "id": "test_public_image"  
 
           },  
 
           },  
 +
          "securityGroup":{
 +
            "id":"group2012Nov02_jD6NX8BsK",
 +
            "links":[
 +
                {
 +
                  "href":"http://{server_name}/accounts/{accountId}/flexcloud/os-security-groups/group2012Nov02_jD6NX8BsK/",
 +
                  "rel":"self"
 +
                }
 +
            ]
 +
          },
 
           "userId": "{user_account_id}",  
 
           "userId": "{user_account_id}",  
 
           "flavor":  {"name": "", "links": [], "id": ""},  
 
           "flavor":  {"name": "", "links": [], "id": ""},  
           "id": "test_server_0013",  
+
           "id": "test_server_0013",
 +
          "zone": "AUS001",
 
           "name": "test_server_created",  
 
           "name": "test_server_created",  
 +
          "adminPass": null,
 
           "created": "2011-11-25T12:16:47",  
 
           "created": "2011-11-25T12:16:47",  
 
           "tenantId": null,  
 
           "tenantId": null,  
Line 212: Line 249:
 
           "metadata": {}
 
           "metadata": {}
 
     }
 
     }
  }
+
  } </nowiki>
</nowiki>
+
* When a server is in pending status (has not completed the provisioning process), the creation timestamp and hostId that are returned will be empty strings.
* When a server is still pending (has not completed the provisioning process), the creation timestamp and hostId that are returned will be empty string.
+
  
 
'''Failure while trying to get server details without proper authorization'''
 
'''Failure while trying to get server details without proper authorization'''
 
''- Response:''
 
''- Response:''
 
''Unauthorized (401)'':  
 
''Unauthorized (401)'':  
 +
<nowiki>
 
     401 Unauthorized
 
     401 Unauthorized
 
     This server could not verify that you are authorized to
 
     This server could not verify that you are authorized to
 
     access the document you requested.  Either you supplied the
 
     access the document you requested.  Either you supplied the
 
     wrong credentials (e.g., bad password), or your browser
 
     wrong credentials (e.g., bad password), or your browser
     does not understand how to supply the credentials required.
+
     does not understand how to supply the credentials required.</nowiki>
  
'''Failure while trying to get server details for non-existent server id'''
+
'''Failure while trying to get server details for a non-existent server id or passing invalid account number'''
 
''- Response:''
 
''- Response:''
 
''ItemNotFound (404)'':  
 
''ItemNotFound (404)'':  
  {
+
  <nowiki>{
 
     "itemNotFound":  
 
     "itemNotFound":  
 
       {
 
       {
 
           "message": "Resource not found",  
 
           "message": "Resource not found",  
 
           "code": 404,  
 
           "code": 404,  
           "details": ""
+
           "details": "",
 +
          "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf"
 
       }
 
       }
  }
+
  }</nowiki>
  
='''PUT''' /servers/'''id'''=
+
='''PUT''' /accounts/{accountId}/flexcloud/servers/{id}=
Updates details info for a single server.
+
This operation will update details of a single server.
  
 
== Parameters ==
 
== Parameters ==
 +
; accountId - ''string''
 +
: The selected account Id.
 +
 
; id - ''string''
 
; id - ''string''
 
: Id of the server to update.
 
: Id of the server to update.
 +
 +
====server attributes====
 +
; name - ''string'' : New display server name to update
  
 
== Request==
 
== Request==
Line 250: Line 294:
 
     "server" :  
 
     "server" :  
 
       {
 
       {
           "name" : "{display_server_name}"  
+
           "name" : "{new_display_name}"  
 
       }
 
       }
  }
+
  } </nowiki>
</nowiki>
+
  
====server====
+
== Response==
; name - ''string''
+
=== JSON ===
: New display server name to update
+
<nowiki>
 +
{
 +
  "server":{
 +
      "status":"ACTIVE",
 +
      "updated":null,
 +
      "hostId":"{host_id}",
 +
      "addresses":{
 +
        "public":[
 +
            {
 +
              "version":4,
 +
              "addr":"{ip_address}"
 +
            }
 +
        ],
 +
        "private":[
 +
            {
 +
              "version":4,
 +
              "addr":"{ip_address}"
 +
            }
 +
        ]
 +
      },
 +
      "links":[
 +
        {
 +
            "href":"http://{api_server}/accounts/{accountId}/flexcloud/servers/{server_id}/",
 +
            "rel":"self"
 +
        }
 +
      ],
 +
      "image":{
 +
        "name":"{display_image_name}",
 +
        "links":[
 +
            {
 +
              "href":"http://{api_server}/accounts/{accountId}/flexcloud/images/{image_id}/",
 +
              "rel":"self"
 +
            }
 +
        ],
 +
        "id":"{image_id}"
 +
      },
 +
      "securityGroup": {
 +
        "id":"{security_group_id}",
 +
        "links":[
 +
            {
 +
              "href":"http://{api_server}/accounts/{accountId}/flexcloud/os-security-groups/{security_group_id}/",
 +
              "rel":"self"
 +
            }
 +
        ]
 +
      },
 +
      "userId":"{user_account_id}",
 +
      "flavor":{
 +
        "name":"1024MB Server3",
 +
        "links":[
 +
            {
 +
              "href":"http://{api_server}/accounts/{accountId}/flexcloud/flavors/{flavor_id}/",
 +
              "rel":"self"
 +
            }
 +
        ],
 +
        "id":3
 +
      },
 +
      "id":"{server_id}",
 +
      "zone": "AUS001",
 +
      "name":"{new_display_name}",
 +
      "adminPass":null,
 +
      "created":"2011-12-05T12:51:28",
 +
      "tenantId":null,
 +
      "accessIPv4":"{ip_address}",
 +
      "accessIPv6":null,
 +
      "progress":100,
 +
      "metadata":{
 +
 
 +
      }
 +
  }
 +
}</nowiki>
  
 
== Response Codes ==
 
== Response Codes ==
 
; Success
 
; Success
: ''HTTP/1.1 204 No Content''
+
: ''HTTP/1.1 200 OK''
  
 
; Failure
 
; Failure
 +
: ''HTTP/1.1 400 Bad Request'' : Display name in use. / Display name invalid.
 
: ''HTTP/1.1 401 Unauthorized'' : This server could not verify that you are authorized to access the document you requested.  Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
 
: ''HTTP/1.1 401 Unauthorized'' : This server could not verify that you are authorized to access the document you requested.  Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
 
: ''HTTP/1.1 404 Not Found'' : The resource requested is not found.
 
: ''HTTP/1.1 404 Not Found'' : The resource requested is not found.
 +
: ''HTTP/1.1 405 Method Not Allowed'' : Unsupported server attribute.
  
== Examples ==
+
='''DELETE''' /accounts/{accountId}/flexcloud/servers/{id}=
'''Successfully update the display name of the specific server'''
+
This operation will delete a single server.
:'''PUT''' http(s)://{api_server}/servers/123
+
''Request Body:''
+
{  
+
    "server" :
+
      {
+
          "name" : "test_server_name_updated"
+
      }
+
}
+
  
''Response Code:''
+
== Parameters ==
<pre>HTTP/1.1 204 No Content</pre>
+
; accountId - ''string''
 +
: The selected account Id.
  
'''Failure updating a non-existent server'''
 
:'''PUT''' http(s)://{api_server}/servers/{<span style="color:red">fake_server_id</span>}
 
''Request Body:''
 
{
 
    "server" :
 
      {
 
          "name" : "test_server_name_updated"
 
      }
 
}
 
 
''Response Code:''
 
<pre>HTTP/1.1 404 Not Found</pre>
 
 
='''DELETE''' /servers/'''id'''=
 
Deletes a single server.
 
 
== Parameters ==
 
 
; id - ''string''
 
; id - ''string''
 
: Id of the server to delete.
 
: Id of the server to delete.
Line 311: Line 401:
 
== Examples ==
 
== Examples ==
 
'''Successfully delete a specific server'''
 
'''Successfully delete a specific server'''
:'''DELETE''' http(s)://{api_server}/servers/123
+
:'''DELETE''' http(s)://{api_server}/accounts/{accountId}/flexcloud/servers/123
  
 
''Response Code:''
 
''Response Code:''
 
<pre>HTTP/1.1 202 Accepted</pre>
 
<pre>HTTP/1.1 202 Accepted</pre>
  
'''Failure updating a non-existent server'''
+
'''Failure while trying to update a non-existent server'''
:'''DELETE''' http(s)://{api_server}/servers/{<span style="color:red">fake_server_id</span>}
+
:'''DELETE''' http(s)://{api_server}/accounts/{accountId}/flexcloud/servers/{<span style="color:red">fake_server_id</span>}
 +
 
 +
''Response Code:''
 +
<pre>HTTP/1.1 404 Not Found</pre>
 +
 
 +
 
 +
'''Failure while trying to pass invalid account number'''
 +
:'''DELETE''' http(s)://{api_server}/accounts/fake/flexcloud/servers/123
  
 
''Response Code:''
 
''Response Code:''
 
<pre>HTTP/1.1 404 Not Found</pre>
 
<pre>HTTP/1.1 404 Not Found</pre>
  
<!--  THIS CODE ENABLES DISQUS COMMENTS ON THE PAGE - DELETE TO DISABLE COMMENTING-->
+
== Alternative URI /servers/{id} ==
 +
An alternative way to execute this call is to omit the ''accountId'' portion of the URI. In this case the system assumes the request is executed for the account identified in the [[Authentication|authorization header]].
  
{{#widget:DISQUS
+
<code>GET /servers/{id}</code>
|id=hostway
+
|uniqid={{PAGENAME}}
+
|url={{fullurl:{{PAGENAME}}}}
+
}}
+
  
<!--  ########################################################################### -->
+
[[Category:Hostway API]]
 +
[[Category:FlexCloud Server API]]

Latest revision as of 07:52, 15 September 2014

This article describes operations for getting details of servers, along with updating and deleting servers in your account. Other types of operations on a server are: ServerCreate, ServerActions, etc.

Contents

[edit] GET /accounts/{accountId}/flexcloud/servers/{id}

This operation will return details of a single server.

[edit] Parameters

accountId - string
The selected account Id.
id - string
Id of the server to get.

[edit] Result

[edit] JSON

{
   "server":{
      "status":"ACTIVE",
      "updated":null,
      "hostId":"{host_id}",
      "addresses":{
         "public":[
            {
               "version":4,
               "addr":"{ip_address}"
            }
         ],
         "private":[
            {
               "version":4,
               "addr":"{ip_address}"
            }
         ]
      },
      "links":[
         {
            "href":"http://{api_server}/accounts/{accountId}/flexcloud/servers/{server_id}/",
            "rel":"self"
         }
      ],
      "image":{
         "name":"{display_image_name}",
         "links":[
            {
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/images/{image_id}/",
               "rel":"self"
            }
         ],
         "id":"{image_id}"
      },
      "userId":"{user_account_id}",
      "flavor":{
         "name":"1024MB Server3",
         "links":[
            {
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/flavors/{flavor_id}/",
               "rel":"self"
            }
         ],
         "id":3
      },
      "securityGroup":{
         "id":"{security_group_id}",
         "links":[
            {
               "href":"http://{server_name}/accounts/{accountId}/flexcloud/os-security-groups/{security_group_id}/",
               "rel":"self"
            }
         ]
      },
      "id":"{server_id}",
      "zone": "{zone_textkey}",
      "name":"{display_server_name}",
      "adminPass":null,
      "created":"2011-12-05T12:51:28",
      "tenantId":null,
      "accessIPv4":"{ip_address}",
      "accessIPv6":null,
      "progress":100,
      "metadata":{

      }
   }
}

[edit] server

id - string
Unique identifier for this server.
links - list
Hypermedia for this resource.
status - string
Current state of the server. Values: BUILD, ACTIVE, PROCESSING, SUSPENDED, DELETED, UNKNOWN
hostId - string
Id of the physical host this virtual machine is running on.
userId - string
Unique identifier for the owner of this server.
name - string
Display name for this server.
adminPass - string
always null.
created - string
The date and time this server was created. ISO 8601 format, YYYY-MM-DDTHH:MM:SS.
accessIPv4 - string
The default included public IPv4 address.
progress - number
The progress of the current this server while in the BUILD status. The value is in the range of 0 - 100, but currently will only even be 0, 50, 100.
metadata - object
Unused always an empty object.
tenantId
Unused always always null.
accessIPv6
Unused always null.
updated
Unused always null.
zone
Zone text key

[edit] addresses

addresses.public.version - number
IP version of this address. Values: 4
addresses.public.addr = string
Public IP address of this server
addresses.private.version - number
IP version of this address. Values: 4
addresses.private.addr - string
Private IP address of this server

[edit] image

image.name - string
The display name of the image this server is based on.
image.links - list
Hypermedia for the image.
image.id - string
Unique identifier for image this server is based on.

[edit] flavor

flavor.name - string
The display name of the flavor this server is based on.
flavor.links - list
Hypermedia for the flavor.
flavor.id - string
Unique identifier for flavor this server is based on.

[edit] securityGroup

securityGroup.id - string
the id of the security group that is assigned to this server
securityGroup.links - list
Hypermedia for the securityGroup.

[edit] Response Codes

Success
OK (200)
Failure
Unauthorized (401) : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
ItemNotFound (404) : The resource requested is not found.

[edit] Examples

Successfully get server details

GET http(s)://{api_server}/accounts/{accountId}/flexcloud/servers/test_server_0013

- Request Headers:

   Content-Type:application/json
   Charset=UTF-8
   Authorization:Base64-encoded username & password string

- Response: OK (200):

 {
    "server": 
       {
          "status": "ACTIVE", 
          "updated": null, 
          "hostId": "{host_id}", 
          "addresses": 
             {
                "public": [
                   {
                      "version": 4, 
                      "addr": "{ip_address}"
                   }
                ], 
                "private": [
                   {
                      "version": 4, 
                      "addr":  "{ip_address}"
                   }
                ]
             }, 
          "links": [
             {
                "href": "http://{api_server}/accounts/{accountId}/flexcloud/servers/test_server_0013/", 
                "rel": "self"
             }
          ], 
          "image": {
             "name": "CentOS 5 Plesk", 
             "links": [
                {
                   "href": "http://{api_server}/accounts/{accountId}/flexcloud/images/test_public_image/", 
                   "rel": "self"
                }
             ], 
             "id": "test_public_image" 
          }, 
          "securityGroup":{
             "id":"group2012Nov02_jD6NX8BsK",
             "links":[
                {
                   "href":"http://{server_name}/accounts/{accountId}/flexcloud/os-security-groups/group2012Nov02_jD6NX8BsK/",
                   "rel":"self"
                }
             ]
          },
          "userId": "{user_account_id}", 
          "flavor":  {"name": "", "links": [], "id": ""}, 
          "id": "test_server_0013",
          "zone": "AUS001",
          "name": "test_server_created", 
          "adminPass": null,
          "created": "2011-11-25T12:16:47", 
          "tenantId": null, 
          "accessIPv4": "{ip_address}", 
          "accessIPv6": null, 
          "progress": 100, 
          "metadata": {}
    }
 } 
  • When a server is in pending status (has not completed the provisioning process), the creation timestamp and hostId that are returned will be empty strings.

Failure while trying to get server details without proper authorization - Response: Unauthorized (401):

     401 Unauthorized
     This server could not verify that you are authorized to
     access the document you requested.  Either you supplied the
     wrong credentials (e.g., bad password), or your browser
     does not understand how to supply the credentials required.

Failure while trying to get server details for a non-existent server id or passing invalid account number - Response: ItemNotFound (404):

{
    "itemNotFound": 
       {
          "message": "Resource not found", 
          "code": 404, 
          "details": "",
          "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf"
       }
 }

[edit] PUT /accounts/{accountId}/flexcloud/servers/{id}

This operation will update details of a single server.

[edit] Parameters

accountId - string
The selected account Id.
id - string
Id of the server to update.

[edit] server attributes

name - string 
New display server name to update

[edit] Request

[edit] JSON

 { 
    "server" : 
       {
          "name" : "{new_display_name}" 
       }
 } 

[edit] Response

[edit] JSON

{
   "server":{
      "status":"ACTIVE",
      "updated":null,
      "hostId":"{host_id}",
      "addresses":{
         "public":[
            {
               "version":4,
               "addr":"{ip_address}"
            }
         ],
         "private":[
            {
               "version":4,
               "addr":"{ip_address}"
            }
         ]
      },
      "links":[
         {
            "href":"http://{api_server}/accounts/{accountId}/flexcloud/servers/{server_id}/",
            "rel":"self"
         }
      ],
      "image":{
         "name":"{display_image_name}",
         "links":[
            {
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/images/{image_id}/",
               "rel":"self"
            }
         ],
         "id":"{image_id}"
      },
      "securityGroup": {
         "id":"{security_group_id}",
         "links":[
            {
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/os-security-groups/{security_group_id}/",
               "rel":"self"
            }
         ]
      },
      "userId":"{user_account_id}",
      "flavor":{
         "name":"1024MB Server3",
         "links":[
            {
               "href":"http://{api_server}/accounts/{accountId}/flexcloud/flavors/{flavor_id}/",
               "rel":"self"
            }
         ],
         "id":3
      },
      "id":"{server_id}",
      "zone": "AUS001",
      "name":"{new_display_name}",
      "adminPass":null,
      "created":"2011-12-05T12:51:28",
      "tenantId":null,
      "accessIPv4":"{ip_address}",
      "accessIPv6":null,
      "progress":100,
      "metadata":{

      }
   }
}

[edit] Response Codes

Success
HTTP/1.1 200 OK
Failure
HTTP/1.1 400 Bad Request : Display name in use. / Display name invalid.
HTTP/1.1 401 Unauthorized : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
HTTP/1.1 404 Not Found : The resource requested is not found.
HTTP/1.1 405 Method Not Allowed : Unsupported server attribute.

[edit] DELETE /accounts/{accountId}/flexcloud/servers/{id}

This operation will delete a single server.

[edit] Parameters

accountId - string
The selected account Id.
id - string
Id of the server to delete.

[edit] Response Codes

Success
HTTP/1.1 202 Accepted or HTTP/1.1 204 No Content
Failure
HTTP/1.1 401 Unauthorized : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
HTTP/1.1 404 Not Found : The resource requested is not found.

[edit] Examples

Successfully delete a specific server

DELETE http(s)://{api_server}/accounts/{accountId}/flexcloud/servers/123

Response Code:

HTTP/1.1 202 Accepted

Failure while trying to update a non-existent server

DELETE http(s)://{api_server}/accounts/{accountId}/flexcloud/servers/{fake_server_id}

Response Code:

HTTP/1.1 404 Not Found


Failure while trying to pass invalid account number

DELETE http(s)://{api_server}/accounts/fake/flexcloud/servers/123

Response Code:

HTTP/1.1 404 Not Found

[edit] Alternative URI /servers/{id}

An alternative way to execute this call is to omit the accountId portion of the URI. In this case the system assumes the request is executed for the account identified in the authorization header.

GET /servers/{id}

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox