1.11. Working with the API

The token is tied to the account and allows you to manage all the services that are available on it, including delegated.
  1. Open the section "API":
  2. In the tab "Access data" check the box next to "I agree to the user agreement and terms of service" and press "Activate token":

Limits on the number of requests to API:

  • Per hour — no more than 180 requests.
  • Per day — no more than 1000 requests.

Information about the time of the last request and the current number of sent requests is displayed in the section "API".

Upon reaching the limits for mail and in Telegram a corresponding notification will be sent (sent no more than once a week).

Warning!

It is highly recommended to configure access restriction to API by IP.

Access restrictions are configured on the tab "Access restriction":

The logic of work is as follows:

  • The address list is empty - access is open for all.
  • There is one or more addresses in the list — access is open only for addresses from the list, closed for the rest.

Addresses and subnets in CIDR format are added to the list of allowed by the button "Add IP to allowed list"... All added addresses are displayed in the list below. You can add a note to each of them or remove it from the list.

You can get acquainted with the list of methods, their descriptions, test their work and get code examples on the tab "Documentation"... The tab consists of several blocks.

In the block "Methods" a list of available methods is displayed:

Warning!

The documentation is being finalized, so not all methods have detailed descriptions.

The block with the name of the selected method contains its detailed description:

  • The method for sending the request is GET or POST.
  • URL - the address to which the request should be sent.
  • Parameters - a list of available parameters, data types for each of them and options for available values.
  • Detailed description of the method and its return values (not for all methods).

On the left side of the block "Request execution" there is a form for quickly sending a request on behalf of the current account, in the right one displays the response code and the result of the sent request:

In the block "Code example" shows example code for using the current method using cURL or a library HostingAPI:

  • Current active the token is automatically substituted into the string with the parameter $auth_token... If the token is not active, it will need to be activated and manually substituted into the code.
  • Parameters from shape after the query is executed, they are automatically substituted into the string with the parameter $post... If the request was not executed, the parameters will need to be specified independently.
Content