Product API Reference

Warning

This API is deprecated and is going to be dropped in 3.3.0 The resource management is going to be replaced by Gandi credits. see also Check available resources

Methods

hosting.product.create(apikey, product)

Create a new hosting product. Create an operation of type hosting_account_product_add.

New in version 3.1.2.

Warning

This is not a free operation. Please ensure your prepaid account has enough credit. Look at the the catalog to get the price.

Parameters:
Returns:

struct – the operation created

hosting.product.delete(apikey, product_id)

Delete a hosting product. Create an operation of type hosting_account_product_delete.

New in version 3.1.2.

Parameters:
  • apikey (string) – API connection key
  • product_id (int) – ID of the product to delete
Returns:

struct – the operation created

hosting.product.renew(apikey, product_id, product)

Renew an existing hosting product. Create an operation of type hosting_account_product_renew.

New in version 3.1.2.

Warning

This is not a free operation. Please ensure your prepaid account has enough credit. Look at the the catalog to get the price.

Parameters:
  • apikey (string) – API connection key
  • product_id (int) – ID of the product to update
  • product (struct) – the product to renew
Returns:

struct – the operation created

hosting.product.update(apikey, product_id, product)

Update quantity of an existing product. Create an operation of type hosting_account_product_update.

New in version 3.1.2.

Warning

This is not a free operation. Please ensure your prepaid account has enough credit. Look at the the catalog to get the price.

Parameters:
  • apikey (string) – API connection key
  • product_id (int) – ID of the product to update
  • product (struct) – the product to update
Returns:

struct – the operation created

Parameters

ProductDescription

parameter of hosting.product.create() and product.create()

Name Default Type Mandatory
duration   string yes
1m: 1 month, 12m: 1 year
product_name   string yes
shares, cores, disk, memory, ips
quantity   int yes
ProductRenewDescription

parameter of hosting.product.renew() and product.renew()

Name Default Type Mandatory
duration   string yes
1m: 1 month, 12m: 1 year
ProductUpdateDescription

parameter of hosting.product.update() and product.update()

Name Default Type Mandatory
quantity   int yes