Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > Suggestions > Topic : API Endpoint should be Master only



Threaded Mode | Print  

 API Endpoint should be Master only (5 Replies, Read 28778 times)
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
Hi,

after testing around with the new API it turns out that it has some usability weakness.

Currently you need to direct the API calls to the server ip/host which you want to query. This should be replaced by an API, that only calls the Master.

Here is why:

If you use the WHMCS module for example, you direct your calls for vm creation to the master only and you setup only one server (the master) in WHMCS, regardless how many slaves you have.

The master (or your settings...) decides on which server the vm will be created.

If you now try to gather usage data you will face a problem.... At the time the data is requested by the whmcs server modules "UsageUpdate" function, it ask (of course) the only server known to whmcs, the master. And you... you have no clue, on which server the vm resides and thus... which server to query.

But the main reason for this suggetion is another one:

If I need to query each server seperately, I need to handle a lot of api keys also. These need to be stored somewhere, New keys need to be added, when new servers are added and the whole logic of retrieving API results needs to be rewritten.

On the other side, if the API calls are directed only to Master, only ONE API key needs to be handled, careless of how many server will be added/removed in the future. The target server could be specified with a param.






Edited by wolke : January 8, 2018, 5:53 pm
IP: --   

API Endpoint should be Master only
radwebhosting
Group: NOC
Post Group: Newbie
Posts: 49
Status:
Completely agree with Wolke, but would modify his request to simply offer alternative to Slave calls which query the Master only

-----------------------
Rad Web Hosting - Dallas, TX | Phoenix, AZ
KVM VPS - Dedicated Servers - Colocation
IP: --   

API Endpoint should be Master only
chirag
Group: Virtualizor Team
Post Group: Elite Member
Posts: 418
Status:
Quote From : wolke January 8, 2018, 5:52 pm
Hi,

after testing around with the new API it turns out that it has some usability weakness.

Currently you need to direct the API calls to the server ip/host which you want to query. This should be replaced by an API, that only calls the Master.

Here is why:

If you use the WHMCS module for example, you direct your calls for vm creation to the master only and you setup only one server (the master) in WHMCS, regardless how many slaves you have.

The master (or your settings...) decides on which server the vm will be created.

If you now try to gather usage data you will face a problem.... At the time the data is requested by the whmcs server modules "UsageUpdate" function, it ask (of course) the only server known to whmcs, the master. And you... you have no clue, on which server the vm resides and thus... which server to query.

But the main reason for this suggetion is another one:

If I need to query each server seperately, I need to handle a lot of api keys also. These need to be stored somewhere, New keys need to be added, when new servers are added and the whole logic of retrieving API results needs to be rewritten.

On the other side, if the API calls are directed only to Master, only ONE API key needs to be handled, careless of how many server will be added/removed in the future. The target server could be specified with a param.






Hi sir,

Sorry for the delay in reply.
When you use API you need to use it for Master server.
Using API you can create VMs on slaves, but Master will not be able to manage those VMs. As Master is not aware of the VM created directly on Slaves.
Due to this we restrict VM creation on Slave server through Virtualizor Panel.

So this way you just need to use only Master server API key and Pass.

Let us know for further information.

-----------------------
Virtualizor - VPS Control Panel
Follow us on Facebook
IP: --   

API Endpoint should be Master only
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
One could give the id /vid together with the API call and Master now knows about which one to handle.
This would solve the WHMCS module problem completely as I now could simply provide the vps id and query the usage data without even knowing where the vps resides.
IP: --   

API Endpoint should be Master only
chirag
Group: Virtualizor Team
Post Group: Elite Member
Posts: 418
Status:
Quote From : wolke September 20, 2018, 10:16 am
One could give the id /vid together with the API call and Master now knows about which one to handle.
This would solve the WHMCS module problem completely as I now could simply provide the vps id and query the usage data without even knowing where the vps resides.


Hi,

Sir VPS ID is created by Master server only.
As the VPS entry is first made on master server and then it is synced to slave and VPS creation call is made for the VPS ID.

Let us know for further information.

-----------------------
Virtualizor - VPS Control Panel
Follow us on Facebook
IP: --   

API Endpoint should be Master only
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
In that case it could work for anything except vps creation. Would be ok also.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 19, 2024, 9:54 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.031