Products¶
List Products¶
GET /api/admin/products
Schema
products: Arrayid: Integerlabel: Stringkind: String<package, image, resource>resource_kind: String - backup,bandwidth,cpu,ipaddr,memory,storage,local_disk (only when kind ==resource)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: Stringkind: String<package, image, resource>resource_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 completely 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: Stringkind: String<package, image, resource>resource_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.
Schema
product: Objectlabel: Stringkind: String<package, image, resource>resource_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
Delete Product¶
DELETE /api/admin/products/{id}