GET /api/admin/products
SCHEMA
products
: Array
id
: Integerlabel
: Stringresource_kind
: String - backup,bandwidth,cpu,ipaddr,memory,storage,local_disk (only for non-packages)unit
: Integer - (only for non-packages)unit_type
: String - (only for non-packages)group
: Stringpackage
: Object
id
: Integercpu
: Decimal - CPU Cores (supports fractional cores as decimal)memory
: String - MBmemory_swap
: Integer - Amount of memory (MB) allowed to swap to disk.memory_swappiness
: Integer between 1 and 100 (default 60).bandwidth
: Integer - Included bandwidth (GB)storage
: Integer - Volume Storage (GB)local_disk
: Integer - Temporary / Local Disk storage (GB)backup
: Integer - Included backup storage (GB)created_at
: DateTimeupdated_at
: DateTimeGET /api/admin/products/{id}
SCHEMA
product
: Object
id
: Integerlabel
: Stringresource_kind
: String - backup,bandwidth,cpu,ipaddr,memory,storage,local_disk (only for non-packages)unit
: Integer - (only for non-packages)unit_type
: String - (only for non-packages)group
: Stringpackage
: Object
id
: Integercpu
: Decimal - CPU Cores (supports fractional cores as decimal)memory
: String - MBmemory_swap
: Integer - Amount of memory (MB) allowed to swap to disk.memory_swappiness
: Integer between 1 and 100 (default 60).bandwidth
: Integer - Included bandwidth (GB)storage
: Integer - Volume Storage (GB)local_disk
: Integer - Temporary / Local Disk storage (GB)backup
: Integer - Included backup storage (GB)created_at
: DateTimeupdated_at
: DateTimePATCH /api/admin/products/{id}
Be aware that updating a package through this will completly delete the package, and re-create it with the values you provide. Be sure to supply all values for the package. To only update the product, and not the package, omit the package_attributes
object.
SCHEMA
product
: Object
label
: Stringresource_kind
: String - backup,bandwidth,cpu,ipaddr,memory,storage,local_disk (only for non-packages)unit
: Integer - (only for non-packages)unit_type
: String - (only for non-packages)group
: String (optional)package_attributes
: Object
cpu
: Decimal - CPU Cores (supports fractional cores as decimal)memory
: String - MBmemory_swap
: Integer - Amount of memory (MB) allowed to swap to disk.memory_swappiness
: Integer between 1 and 100 (default 60).bandwidth
: Integer - Included bandwidth (GB)storage
: Integer - Volume Storage (GB)local_disk
: Integer - Temporary / Local Disk storage (GB)backup
: Integer - Included backup storage (GB)POST /api/admin/products
Be sure to add products to billing plans and create price rules.
??? abstract "Create Product Schema"
product
: Object
label
: Stringresource_kind
: String - backup,bandwidth,cpu,ipaddr,memory,storage,local_disk (only for non-packages)unit
: Integer - (only for non-packages)unit_type
: String - (only for non-packages)group
: String (optional)package_attributes
: Object
cpu
: Decimal - CPU Cores (supports fractional cores as decimal)memory
: String - MBmemory_swap
: Integer - Amount of memory (MB) allowed to swap to disk.memory_swappiness
: Integer between 1 and 100 (default 60).bandwidth
: Integer - Included bandwidth (GB)storage
: Integer - Volume Storage (GB)local_disk
: Integer - Temporary / Local Disk storage (GB)backup
: Integer - Included backup storage (GB)EXAMPLE
{
"product": {
"label": "example",
"package_attributes": {
"cpu": "1.0",
"memory": 1024
}
}
}