Service management via API

From ISPWiki
(Redirected from Service management viaa API)
Jump to: navigation, search

This article describes how you can order, delete, renew, and edit services (shared hosting, VPS, dedicated servers) via API.

Order

Function API:

  • vhost.order.param - order shared hosting;
  • vds.order.param - order VPS;
  • dedic.order.param - order dedicated server.

Mandatory parameters:

  • authinfo or auth - authorization data in control panel;
  • pricelist - tariff id ;
  • datacenter - data center id;
  • period - order period. Possible values: an integer which equals the number of months. For example, service order for 1 month - period=1, half-a-year - period=6, 1 year - period=12, etc;
  • sok - confirm order.

Additional parameters:

  • domain - service domain name. if this parameters is not specified, BILLmanager will set a random value;
  • skipbasket - the skipbasket=on parameter indicates that the service renewal order won't be added into Cart, but funds will be debited from client's account.
  • autoprolong - auto-renewal period. Possible values: integer which equals to the number of months;
  • ostempl - OS template for dedicated server or VPS;
  • recipe - recipe that will be deployed after OS setup on dedicated server or VPS;

Tariff add-ons - the addon_ parameter will be passed while placing an order via API. Possible value is addon_5=10, where 5 - add-on id, 10 - value . Add-on id can be found in Tariff plans --> Configuration --> id field. You can activate the filed in the table settings form;

Example of API call for shared hosting order:

https://<BILLmamager address>?authinfo=username:password&func=vhost.order.param&autoprolong=1&datacenter=1&domain=domain.name&period=1&pricelist=2&skipbasket=on&addon_5=10&sok=ok

Example of API call for VPS order:

https://<BILLmamager address>?authinfo=username:password&func=vds.order.param&addon_10=6&addon_11=256&addon_12=500&addon_13=1&addon_14=28&addon_15=0&addon_28=1&addon_7=5000&addon_9=5&autoprolong=1& ostempl=ISPsystem%5F%5FCentOS%2D7%2Damd64&period=1&pricelist=6&skipbasket=on&domain=vds.test&sok=ok 

Example of API call for dedicated server order:

https://<BILLmamager address>?authinfo=username:password&func=dedic.order.param&period=1&pricelist=32&datacenter=1&domain=domain.name&addon_33=1&addon_35=1&sok=ok

Renewal

Service renewal function:

  • service.prolong

Mandatory parameters:

  • authinfo or auth - authorization data in control panel;
  • elid - service id;
  • period - order period. Possible values: an integer which equals to the number of months. For example, service order for 1 month - period=1, half-a-year - period=6, 1 year - period=12, etc;
  • sok - confirm operation.

Optional parameters:

  • skipbasket - the skipbasket=on parameter indicates that the service renewal order won't be added into Cart, but funds will be debited from client's account.

Example of API call for service renewal:

  https://<BILLmamager address>?authinfo=username:password&func=service.prolong&period=1&elid=958&skipbasket=on&sok=ok

Edit service parameters

Function API:

  • vhost.edit - edit parameters of shared-hosting;
  • vds.edit - edit parameters of VPS;
  • dedic.edit - edit parameters of dedicated server.

Mandatory paramaters:

  • authinfo orauth - authorization data in control panel;
  • elid - service id;
  • sok - confirm operation.

Optional parameters:

  • addon_ - tariff add-on that should be edited, for example: addon_11=512, where 11 - add-on id, 512 - value. Add-oт id can be found in Tariff plans --> Configuration --> id field. You can activate the filed in the table settings form;
  • autoprolong - auto-renewal period. Possible values: integer which equals to the number of months;

More parameters are available on Admin level:

  • domain - service domain name;
  • ip - service IP address;
  • username - username in control panel (e.g. in VMmanager);
  • userpassword - user password in control panel (e.g. in VMmanager);
  • serverid - server name in control panel (e.g. in VMmanager);
  • ostempl - OS template for VPS or dedicated server;
  • recipe - pre-installed software (recipe) for VPS or dedicated server;

Example of API call to modify parameters of shared hosting:

 https://<BILLmamager address>?authinfo=username:password&func=vhost.edit&addon_34=1024&elid=945&sok=ok

Example of API call to modify parameters of virtual private server:

https://<BILLmamager address>?authinfo=username:password&func=vds.edit&addon_11=512&elid=958&sok=ok

Example of API call to modify domain name, IP address, and user credentials in control panel for VPS:

https://<BILLmamager address>?authinfo=admin:password&func=vds.edit&username=user134&userpassword=jYh4nsqe&domain=company.com&ip=8.8.8.8&elid=958&sok=ok

Example of API call to modify parameters of dedicated server:

 https://<BILLmamager address>?authinfo=username:password&func=dedic.edit&addon_26=10&addon_26=10&addon_28=5000&elid=1065&sok=ok

Deletion

Function API:

  • vhost.delete - delete shared hosting;
  • vds.delete - delete VPS;
  • dedic.delete - delete dedicated server.

Mandatory parameters:

  • authinfo or auth - authorization data in control panel;
  • elid - service id;
  • sok - confirm operation.

Example of API call for VPS order:

 https://<BILLmamager address>?authinfo=username:password&func=vds.delete&elid=938&sok=ok

Example of API call for shared hosting order:

 https://<BILLmamager address>?authinfo=username:password&func=vhost.delete&elid=1085&sok=ok

Example of API call for dedicated server order:

  https://<BILLmamager address>?authinfo=username:password&func=dedic.delete&elid=892&sok=ok