Add Bucket

To create a new bucket, use the following request:

1
2
POST /billing/buckets.xml
POST /billing/buckets.json

XML Request Example

1
curl -i -X POST http://onapp.test/billing/buckets.xml -H 'Accept: application/xml' -H 'Content-Type: application/xml' -u user:userpass -d '<bucket><label>Label</label><currency_code>USD<monthly_price type="integer">10<allows_kms type="boolean">false<allows_mak type="boolean">true<allows_own type="boolean">false</allows_own></allows_mak></allows_kms></monthly_price></currency_code></bucket>'

JSON Request Example

1
curl -i -X POST http://onapp.test/billing/buckets.json -H 'Accept: application/json' -H 'Content-Type: application/json' -u user:userpass -d '{"bucket":{"label":"Label","currency_code":"USD","monthly_price":10,"allows_kms":false,"allows_mak":true,"allows_own":false}}'

Where:

label* - the bucket name

currency_code* - the currency that users will be charged in within this bucket (USD by default)

monthly_price* - set the monthly fee for bucket 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