Products¶
List Products¶
GET /api/admin/products
Schema
products
: Arrayid
: 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
: Objectid
: 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
: DateTime
View Product¶
GET /api/admin/products/{id}
Schema
product
: Objectid
: 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
: Objectid
: 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
: DateTime
Update Product¶
PATCH /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
: Objectlabel
: 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
: Objectcpu
: 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)
Create Product¶
POST /api/admin/products
Be sure to add products to billing plans and create price rules.
Create Product Schema
product
: Objectlabel
: 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
: Objectcpu
: 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: Create New Package
{
"product": {
"label": "example",
"package_attributes": {
"cpu": "1.0",
"memory": 1024
}
}
}
Delete Product¶
DELETE /api/admin/products/{id}
Last update: 2021-12-23