<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docs.hostway.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docs.hostway.com/index.php?action=history&amp;feed=atom&amp;title=Accounts-accountId-os-security-groups%3APOST</id>
		<title>Accounts-accountId-os-security-groups:POST - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docs.hostway.com/index.php?action=history&amp;feed=atom&amp;title=Accounts-accountId-os-security-groups%3APOST"/>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:POST&amp;action=history"/>
		<updated>2026-05-23T14:08:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:POST&amp;diff=2138&amp;oldid=prev</id>
		<title>Mike.robski: 1 revision: Release 109</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:POST&amp;diff=2138&amp;oldid=prev"/>
				<updated>2015-07-24T18:12:59Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision: Release 109&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:12, 24 July 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mike.robski</name></author>	</entry>

	<entry>
		<id>http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:POST&amp;diff=2137&amp;oldid=prev</id>
		<title>Jerry.dimitrov at 16:48, 20 April 2015</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:POST&amp;diff=2137&amp;oldid=prev"/>
				<updated>2015-04-20T16:48:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A Security/Firewall Group defines firewall rules for your Server. You have the ability to configure your firewall connections and secure your network as required. You may have one or multiple servers behind a firewall group. Hostway provides a default firewall group, and typical firewall rules are already configured. You can create multiple firewall groups as needed.&lt;br /&gt;
&lt;br /&gt;
='''POST''' /accounts/''{accountId}''/os-security-groups=&lt;br /&gt;
This operation will create a new firewall group.&lt;br /&gt;
&lt;br /&gt;
== Request ==&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
; accountId - ''string''&lt;br /&gt;
: The selected account Id.&lt;br /&gt;
&lt;br /&gt;
=== JSON ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;securityGroup&amp;quot; : {&lt;br /&gt;
       &amp;quot;displayName&amp;quot; : &amp;quot;{firewall_group_display_name}&amp;quot;, &lt;br /&gt;
       &amp;quot;description&amp;quot; : &amp;quot;{firewall_group_description}&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====securityGroup====&lt;br /&gt;
; displayName - ''string''&lt;br /&gt;
: Display name for this firewall group.&lt;br /&gt;
&lt;br /&gt;
; description - ''string''&lt;br /&gt;
: Descriptive information for this firewall group.&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
=== JSON ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;securityGroup&amp;quot; : {&lt;br /&gt;
      &amp;quot;displayName&amp;quot;: &amp;quot;{firewall_group_display_name}&amp;quot;, &lt;br /&gt;
      &amp;quot;description&amp;quot;: &amp;quot;{firewall_group_description}&amp;quot;, &lt;br /&gt;
      &amp;quot;links&amp;quot;: [&lt;br /&gt;
         {&lt;br /&gt;
            &amp;quot;href&amp;quot;: &amp;quot;&amp;lt;/nowiki&amp;gt;{{APIBaseURL}}&amp;lt;nowiki&amp;gt;/accounts/{accountId}/os-security-groups/{firewall_group_id}/&amp;quot;, &lt;br /&gt;
            &amp;quot;rel&amp;quot;: &amp;quot;self&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      ], &lt;br /&gt;
      &amp;quot;rules&amp;quot;: [], &lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;{firewall_group_id}&amp;quot;, &lt;br /&gt;
      &amp;quot;accountNumber&amp;quot;: &amp;quot;{user_account_number}&amp;quot;, &lt;br /&gt;
      &amp;quot;servers&amp;quot;: []&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====securityGroup====&lt;br /&gt;
; displayName - ''string''&lt;br /&gt;
: Display name for this firewall group.&lt;br /&gt;
&lt;br /&gt;
; description - ''string''&lt;br /&gt;
: Descriptive information for this firewall group.&lt;br /&gt;
&lt;br /&gt;
; links - ''list''&lt;br /&gt;
: [[Hypermedia]] for this resource.&lt;br /&gt;
&lt;br /&gt;
; rules - ''list''&lt;br /&gt;
: List of all defined security rules for the group.&lt;br /&gt;
&lt;br /&gt;
; id - ''string''&lt;br /&gt;
: The id of the firewall group.*(Unique identifier for this firewall group.)&lt;br /&gt;
&lt;br /&gt;
; accountNumber - ''string''&lt;br /&gt;
: The account number this firewall group resource belongs to.&lt;br /&gt;
&lt;br /&gt;
; servers - ''list''&lt;br /&gt;
: List of server IDs this security group is assigned to.&lt;br /&gt;
&lt;br /&gt;
== Response Codes ==&lt;br /&gt;
; Success&lt;br /&gt;
: ''HTTP/1.1 201 Created''&lt;br /&gt;
&lt;br /&gt;
; Failure&lt;br /&gt;
: ''HTTP/1.1 400 Bad Request''&lt;br /&gt;
: ''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.&lt;br /&gt;
: ''HTTP/1.1 409 Conflict'' - The resource already exists.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
'''Successfully create a new firewall group'''&lt;br /&gt;
:'''POST''' {{APIBaseURL}}/accounts/{accountId}/os-security-groups&lt;br /&gt;
&lt;br /&gt;
''Request Headers:''&lt;br /&gt;
    Content-Type:application/json&lt;br /&gt;
    Charset=UTF-8&lt;br /&gt;
    Authorization:Base64-encoded username &amp;amp; password string&lt;br /&gt;
&lt;br /&gt;
''Request Body:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;securityGroup&amp;quot; : {&lt;br /&gt;
       &amp;quot;displayName&amp;quot; : &amp;quot;Test Firewall Group&amp;quot;, &lt;br /&gt;
       &amp;quot;description&amp;quot; : &amp;quot;Test firewall group description.&amp;quot; &lt;br /&gt;
    }&lt;br /&gt;
 } &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Code:''&lt;br /&gt;
&amp;lt;pre&amp;gt;HTTP/1.1 201 Created&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Body:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;securityGroup&amp;quot; : {&lt;br /&gt;
       &amp;quot;displayName&amp;quot;: &amp;quot;Test Firewall Group&amp;quot;, &lt;br /&gt;
       &amp;quot;description&amp;quot;: &amp;quot;Test firewall group description.&amp;quot;, &lt;br /&gt;
       &amp;quot;links&amp;quot;: [&lt;br /&gt;
          {&lt;br /&gt;
             &amp;quot;href&amp;quot;: &amp;quot;&amp;lt;/nowiki&amp;gt;{{APIBaseURL}}&amp;lt;nowiki&amp;gt;/accounts/{accountId}/os-security-groups/group2012May11_OK30Zs7Ju/&amp;quot;, &lt;br /&gt;
             &amp;quot;rel&amp;quot;: &amp;quot;self&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
       ], &lt;br /&gt;
       &amp;quot;rules&amp;quot;: [], &lt;br /&gt;
       &amp;quot;id&amp;quot;: &amp;quot;group2012May11_OK30Zs7Ju&amp;quot;, &lt;br /&gt;
       &amp;quot;accountNumber&amp;quot;: &amp;quot;test_account_120761&amp;quot;,&lt;br /&gt;
       &amp;quot;servers&amp;quot;: []&lt;br /&gt;
    }&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Failure while trying to create a new firewall group with invalid data'''&lt;br /&gt;
:'''POST''' {{APIBaseURL}}/accounts/{accountId}/os-security-groups&lt;br /&gt;
&lt;br /&gt;
''Request Headers:''&lt;br /&gt;
    Content-Type:application/json&lt;br /&gt;
    Charset=UTF-8&lt;br /&gt;
    Authorization:Base64-encoded username &amp;amp; password string&lt;br /&gt;
&lt;br /&gt;
''Request Body:''&lt;br /&gt;
 {&lt;br /&gt;
    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Empty&amp;lt;/span&amp;gt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
''Response Code:''&lt;br /&gt;
&amp;lt;pre&amp;gt;HTTP/1.1 400 Bad Request&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Body:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;badRequest&amp;quot; : {&lt;br /&gt;
       &amp;quot;message&amp;quot;: &amp;quot;Invalid&amp;quot;, &lt;br /&gt;
       &amp;quot;code&amp;quot;: 400, &lt;br /&gt;
       &amp;quot;details&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
       &amp;quot;errorid&amp;quot;: &amp;quot;59e0b3dd-2173-432a-8ff5-60efe16e83bf&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Failure while trying to create a new firewall group with an already existing firewall group display name'''&lt;br /&gt;
:'''POST''' {{APIBaseURL}}/accounts/{accountId}/os-security-groups&lt;br /&gt;
&lt;br /&gt;
''Request Headers:''&lt;br /&gt;
    Content-Type:application/json&lt;br /&gt;
    Charset=UTF-8&lt;br /&gt;
    Authorization:Base64-encoded username &amp;amp; password string&lt;br /&gt;
&lt;br /&gt;
''Request Body:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;securityGroup&amp;quot; : {&lt;br /&gt;
       &amp;quot;displayName&amp;quot; : &amp;quot;Test Firewall Group&amp;quot;,&lt;br /&gt;
       &amp;quot;description&amp;quot; : &amp;quot;Test firewall group description.&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Code:''&lt;br /&gt;
&amp;lt;pre&amp;gt;HTTP/1.1 409 Conflict&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Body:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;computeFault&amp;quot; : {&lt;br /&gt;
       &amp;quot;message&amp;quot;: &amp;quot;GroupNameError&amp;quot;, &lt;br /&gt;
       &amp;quot;code&amp;quot;: 400, &lt;br /&gt;
       &amp;quot;details&amp;quot;: &amp;quot;Display name in use&amp;quot;,&lt;br /&gt;
       &amp;quot;errorid&amp;quot;: &amp;quot;59e0b3dd-2173-432a-8ff5-60efe16e83bf&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Failure while trying to make unauthorized access'''&lt;br /&gt;
:'''POST''' {{APIBaseURL}}/accounts/{accountId}/os-security-groups&lt;br /&gt;
&lt;br /&gt;
''Request Headers:''&lt;br /&gt;
    Content-Type:application/json&lt;br /&gt;
    Charset=UTF-8&lt;br /&gt;
    Authorization:Base64-encoded &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;fake_authentication_string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Code:''&lt;br /&gt;
&amp;lt;pre&amp;gt;HTTP/1.1 401 Unauthorized&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Body:''&lt;br /&gt;
     401 Unauthorized&lt;br /&gt;
     This server could not verify that you are authorized to&lt;br /&gt;
     access the document you requested.  Either you supplied the&lt;br /&gt;
     wrong credentials (e.g., bad password), or your browser&lt;br /&gt;
     does not understand how to supply the credentials required.&lt;br /&gt;
&lt;br /&gt;
'''Failure while trying to pass invalid account number'''&lt;br /&gt;
:'''POST''' {{APIBaseURL}}/accounts/fakeId/os-security-groups&lt;br /&gt;
&lt;br /&gt;
''Response Code:''&lt;br /&gt;
&amp;lt;pre&amp;gt;HTTP/1.1 404 Not Found&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Response Body:''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;itemNotFound&amp;quot; : {&lt;br /&gt;
       &amp;quot;message&amp;quot;: &amp;quot;Resource not found&amp;quot;, &lt;br /&gt;
       &amp;quot;code&amp;quot;: 404, &lt;br /&gt;
       &amp;quot;details&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
       &amp;quot;errorid&amp;quot;: &amp;quot;59e0b3dd-2173-432a-8ff5-60efe16e83bf&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Alternative URI /accounts/os-security-groups ==&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /accounts/os-security-groups&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Hostway API]]&lt;br /&gt;
[[Category:FlexCloud Server API]]&lt;/div&gt;</summary>
		<author><name>Jerry.dimitrov</name></author>	</entry>

	</feed>