Get List of User Groups
To get a list of user groups:
1
2
| GET /user_groups.xml
GET /user_groups.json
|
XML Request Example
1
| curl -i -u user:userpass -X GET http://onapp.test/user_groups.xml -H 'Accept: application/xml' -H 'Content-type: application/xml'
|
JSON Request Example
1
| curl -i -u user:userpass -X GET http://onapp.test/user_groups.json -H 'Accept: application/json' -H 'Content-type: application/json'
|
XML Output Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| <user_groups type="array">
<user_group>
<closed type="boolean">false</closed>
<created_at type="datetime">2015-04-15T16:02:20+03:00</created_at>
<federation_enabled type="boolean">false</federation_enabled>
<federation_id nil="true"/>
<hypervisor_id nil="true"/>
<id type="integer">56</id>
<identifier>abywglogotbqza</identifier>
<label>test</label>
<traded type="boolean">false</traded>
<updated_at type="datetime">2015-04-15T16:02:20+03:00</updated_at>
<user_buckets type="array">
<user_bucket>
<id type="integer">1</id>
<label>default billing</label>
<created_at type="dateTime">2017-11-24T12:09:57+00:00</created_at>
<updated_at type="dateTime">2017-11-24T12:09:57+00:00</updated_at>
<currency_code>USD</currency_code>
<show_price nil="true"/>
<monthly_price type="decimal">0.0</monthly_price>
<allows_mak type="boolean">true</allows_mak>
<allows_kms type="boolean">false</allows_kms>
<allows_own type="boolean">false</allows_own>
</user_bucket>
</user_buckets>
<roles type="array">
<role>
<id type="integer">1</id>
<label>Administrator</label>
<identifier>admin</identifier>
<created_at type="datetime">2013-09-03T15:31:13+03:00</created_at>
<updated_at type="datetime">2015-04-15T15:26:46+03:00</updated_at>
<users_count type="integer">24</users_count>
</role>
</roles>
</user_group>
<user_group>...</user_group>
</user_groups>
|
Where:
- closed - not relevant to user groups
- created_at – the date when this record was created in database
- federation_enabled - not relevant to user groups
- federation_id - not relevant to user groups
- id – the group ID
- identifier — identifier of the user group
- label – the group name
- traded - not relevant to user groups
- updated_at – the date when this record was updated in database
- user_buckets — an array of buckets to which this account is assigned to, where
- id - the bucket type ID
- label - the bucket name
- created_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
- updated_at - the date when the bucket was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format
- currency_code - the currency in which the users are charged
- show_price - true if users can see the prices set up for them; otherwise, false
- monthly_price - monthly fee for plan usage
- allows_kms - true if the KMS licensing is allowed for this bucket; otherwise, false
- allows_mak - true if the MAK licensing is allowed; otherwise, false
- allows_own - true if adding own licenses is allowed for this bucket; otherwise, false
- roles — an array of user roles to which this account is assigned to, where
- id – role ID
- label – role title
- identifier – role identifier
- created_at – the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
- updated_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
- users_count - the number of users assigned to the role