Add Bucket

To create a new bucket, use the following request:

POST /billing/buckets.xml
POST /billing/buckets.json

XML Request Example

curl -i -X POST http://onapp.test/billing/buckets.xml -H 'Accept: application/xml' -H 'Content-Type: application/xml' -u account_email:API_key -d '<bucket><label>Label</label><currency_code>USD</currency-code><monthly_price type="integer">10</monthly-price><allows_kms type="boolean">false</allows-kms><allows_mak type="boolean">true</allows-mak><allows_own type="boolean">false</allows-own></bucket>'

JSON Request Example

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


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