leasing_contracts.php¶
Leasing contracts management module for handling contract creation, updates, server binding, and retrieval of associated servers.
API Methods¶
| Method | Action | Description |
|---|---|---|
create | create contract | Creates a new leasing contract |
delete | delete contract | Unbinds servers and deletes the specified leasing contract |
get | get contract | Retrieves details of a specific leasing contract |
list | get list | Returns a list of leasing contracts |
show_servers | get bound servers | Returns a list of server IDs associated with the contract |
update | update contract | Updates an existing leasing contract and re-syncs bound servers |
update_server_list | update bound servers | Updates the list of servers associated with a contract |
leasing_contracts/list¶
Returns a list of leasing contracts
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list |
Request example
Success response example
leasing_contracts/get¶
Retrieves details of a specific leasing contract
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get |
| token | ✅ | string | Authentication token |
| id | ✅ | integer | Leasing contract ID |
Request example
Success response example
leasing_contracts/update¶
Updates an existing leasing contract and re-syncs bound servers
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update |
| token | ✅ | string | Authentication token |
| id | ✅ | integer | Leasing contract ID |
| params | ✅ | object | Contract update parameters |
Request example
Success response example
leasing_contracts/create¶
Creates a new leasing contract
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: create |
| token | ✅ | string | Authentication token |
Request example
Success response example
leasing_contracts/delete¶
Unbinds servers and deletes the specified leasing contract
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: delete |
| token | ✅ | string | Authentication token |
| id | ✅ | integer | Leasing contract ID |
Request example
leasing_contracts/show_servers¶
Returns a list of server IDs associated with the contract
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: show_servers |
| token | ✅ | string | Authentication token |
| id | ✅ | integer | Leasing contract ID |
Request example
leasing_contracts/update_server_list¶
Updates the list of servers associated with a contract
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update_server_list |
| token | ✅ | string | Authentication token |
| id | ✅ | integer | Leasing contract ID |
| params[servers] | ✅ | array<string> | List of server IDs to bind to the contract. |
| params[servers], [] | ✅ | array<string> | List of server IDs to bind to the contract. Accepts multiple values: params[servers], []=101¶ms[servers], []=102 |
| servers | ✅ | string | Параметр servers |
Request example