<?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%3AGET</id>
		<title>Accounts-accountId-os-security-groups:GET - 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%3AGET"/>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:GET&amp;action=history"/>
		<updated>2026-05-18T01:03:13Z</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:GET&amp;diff=2134&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:GET&amp;diff=2134&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:GET&amp;diff=2133&amp;oldid=prev</id>
		<title>Jerry.dimitrov at 16:46, 20 April 2015</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-os-security-groups:GET&amp;diff=2133&amp;oldid=prev"/>
				<updated>2015-04-20T16:46:20Z</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;This operation lists existing firewall groups. &lt;br /&gt;
&lt;br /&gt;
='''GET''' /accounts/''{accountId}''/os-security-groups=&lt;br /&gt;
This operation lists existing firewall groups.&lt;br /&gt;
&lt;br /&gt;
== Request ==&lt;br /&gt;
==== Request Parameters ====&lt;br /&gt;
; accountId - ''string''&lt;br /&gt;
: The selected account Id.&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;securityGroups&amp;quot; : [&lt;br /&gt;
       {&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;
             {&lt;br /&gt;
		&amp;quot;fromPort&amp;quot; : {start_port},&lt;br /&gt;
		&amp;quot;toPort&amp;quot; : {end_port},&lt;br /&gt;
		&amp;quot;protocol&amp;quot; : &amp;quot;{ip_protocol}&amp;quot;,&lt;br /&gt;
		&amp;quot;cidr&amp;quot;: &amp;quot;0.0.0.0/0&amp;quot;,&lt;br /&gt;
		&amp;quot;id&amp;quot; : &amp;quot;145&amp;quot;&lt;br /&gt;
	     }&lt;br /&gt;
          ]&lt;br /&gt;
	  &amp;quot;servers&amp;quot; : [&amp;quot;{server_id}&amp;quot;],&lt;br /&gt;
	  &amp;quot;accountNumber&amp;quot; : &amp;quot;{user_account_number}&amp;quot;,&lt;br /&gt;
	  &amp;quot;Id&amp;quot; : &amp;quot;{firewall_group_id}&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
    ]&lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====security_groups====&lt;br /&gt;
; displayName - ''string''&lt;br /&gt;
: The display name of the firewall group.&lt;br /&gt;
&lt;br /&gt;
; description - ''string''&lt;br /&gt;
: Text describing the 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 describing all defined security rules for the group.&lt;br /&gt;
&lt;br /&gt;
; fault - ''dictionary''&lt;br /&gt;
: Might hold a fault information for the firewall group.&lt;br /&gt;
&lt;br /&gt;
; servers - ''list''&lt;br /&gt;
: List of server ids this firewall group is assigned to.&lt;br /&gt;
&lt;br /&gt;
; accountNumber - ''string''&lt;br /&gt;
: Identifies an account that owns the firewall group.&lt;br /&gt;
&lt;br /&gt;
; id - ''string''&lt;br /&gt;
: The id of this firewall group.*(Unique identifier for this firewall group.)&lt;br /&gt;
&lt;br /&gt;
== Response Codes ==&lt;br /&gt;
; Success&lt;br /&gt;
: ''HTTP/1.1 200 OK''&lt;br /&gt;
&lt;br /&gt;
; Failure&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 404 Not Found'' - The resource does not exist.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
'''Successfully list firewall groups'''&lt;br /&gt;
:'''GET''' {{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;
''Response Code:''&lt;br /&gt;
&amp;lt;pre&amp;gt;HTTP/1.1 200 OK&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;
       {&lt;br /&gt;
          &amp;quot;displayName&amp;quot;: &amp;quot;Test Firewall Group 1&amp;quot;, &lt;br /&gt;
          &amp;quot;description&amp;quot;: &amp;quot;Test firewall group 1 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;
             {&lt;br /&gt;
                'toPort': 1111, &lt;br /&gt;
                'fromPort': 1111, &lt;br /&gt;
                'protocol': 'TCP', &lt;br /&gt;
                'id': 145, &lt;br /&gt;
                'cidr': '0.0.0.0/0'&lt;br /&gt;
             },&lt;br /&gt;
             {&lt;br /&gt;
                'toPort': 80, &lt;br /&gt;
                'fromPort': 80, &lt;br /&gt;
                'protocol': 'TCP', &lt;br /&gt;
                'id': 196, &lt;br /&gt;
                'cidr': '127.0.0.1/24'&lt;br /&gt;
             }&lt;br /&gt;
          ], &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;: [&amp;quot;test-server-0003&amp;quot;]&lt;br /&gt;
       },&lt;br /&gt;
       {&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/group2012Apr30_9J5qDwOIo/&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;
             {&lt;br /&gt;
                'toPort': 3389, &lt;br /&gt;
                'fromPort': 3389, &lt;br /&gt;
                'protocol': 'tcp', &lt;br /&gt;
                'id': 116, &lt;br /&gt;
                'cidr': '0.0.0.0/0'&lt;br /&gt;
             }, &lt;br /&gt;
             {&lt;br /&gt;
                'toPort': 8443, &lt;br /&gt;
                'fromPort': 8443, &lt;br /&gt;
                'protocol': 'tcp', &lt;br /&gt;
                'id': 117, &lt;br /&gt;
                'cidr': '0.0.0.0/0'&lt;br /&gt;
             }, &lt;br /&gt;
             {&lt;br /&gt;
                'toPort': 22, &lt;br /&gt;
                'fromPort': 22, &lt;br /&gt;
                'protocol': 'tcp', &lt;br /&gt;
                'id': 118, &lt;br /&gt;
                'cidr': '0.0.0.0/0'&lt;br /&gt;
             }&lt;br /&gt;
          ], &lt;br /&gt;
          &amp;quot;id&amp;quot;: &amp;quot;group2012Apr30_9J5qDwOIo&amp;quot;, &lt;br /&gt;
          &amp;quot;accountNumber&amp;quot;: &amp;quot;test_account_901265&amp;quot;,&lt;br /&gt;
          &amp;quot;servers&amp;quot;: [&amp;quot;test-server-0011&amp;quot;, &amp;quot;test-server-0024&amp;quot;]&lt;br /&gt;
       }&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;GET /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>