vserver_allowed_plans ()
Lists all programs that can be accessed from the program.
HTTP Method: | GET | |
---|
Parameters: | sid | session id* |
---|
| plan_id | unique VPS plan identifier* |
Returns: | HTTP code | 200 (OK) |
---|
| | Function call successful. Reply portion reply contains a list of applicable programs. It is divided into upgrade and downgrade. |
Return errors
Error code | HTTP response code | Description |
---|
1 | 400 (Bad request) |
Function was not performed, because all required parameters were not entered. Reply portion reply is empty.
|
3 | 403 (Forbidden) |
Function call failed, invalid sid parameter. Create new sid using /api/login function. Reply portion reply is empty.
|
CURL
curl "https://admin.hosting90.eu/api/vserver_allowed_plans?sid=%sid%&plan_id=%plan_id%"
PHP Library
$api->vserver_allowed_plans(array(
'plan_id' => %plan_id%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<plans>
<downgrade>
<plan>
<plan_id>plan_id</plan_id>
<name>name</name>
</plan>
</downgrade>
<upgrade>
<plan>
<plan_id>plan_id</plan_id>
<name>name</name>
</plan>
</upgrade>
</plans>
</reply>