You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-54Lines changed: 12 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,41 +1,9 @@
1
1
# Hostinger API Python SDK
2
-
> [!caution]
3
-
> Currently, this API is in beta stage, meaning that breaking changes, while unlikely, might be introduced.
4
-
> If you encounter any issues or have any feedback, please create an issue on the [Github Repository](https://github.com/hostinger/api/issues).
5
-
# Overview
6
-
The Hostinger API provides a comprehensive set of endpoints that allow developers to interact with Hostinger's services programmatically.
7
-
This API enables you to manage various aspects of your Hostinger account.
8
-
9
-
The Hostinger API is a (mostly) RESTful API that uses standard HTTP methods and status codes.
10
-
# Authentication
11
-
The Hostinger API uses tokens for authentication. To authenticate your requests, you need to include a valid bearer token in the Authorization header of your HTTP requests:
12
-
```yaml
13
-
Authorization: Bearer YOUR_API_TOKEN
14
-
```
15
-
API tokens for individual users can be created and managed from the [VPS page](https://hpanel.hostinger.com/vps) of the Hostinger Panel.
16
-
Tokens will have same permissions as the owning user. Optionally, tokens can be set to expire after a certain period of time.
17
-
# Rate Limiting
18
-
To ensure fair usage and prevent abuse, the API enforces rate limits on the number of requests that can be made within a certain time period.
19
-
If you exceed the rate limit, you will receive a 429 Too Many Requests response. Rate limit headers are included in the response to help you manage your requests.
20
-
Your IP address might get temporarily blocked if you exceed the rate limit multiple times.
21
-
# Parameters
22
-
All requests sent to API must have the content type `application/json`. `POST`, `PUT`, `PATCH` methods may include a JSON object in the request body. Documentation provides required structure and examples of the object.
23
-
Some endpoints require path parameters. These parameters are included in the URL path and are marked with curly braces.
24
-
# Pagination
25
-
Some endpoints return a large number of items. To make these responses more manageable, the API uses pagination.
26
-
By default, the API returns50 items per page.
27
-
28
-
The page number can be specified using the `page` query parameter, for example: `/api/vps/v1/public-keys?page=2`
29
-
# Errors
30
-
The Hostinger API uses standard HTTP status codes to indicate the success or failure of a request.
31
-
In case of an error, the API will return a JSON response with an `error` field, containing a human-readable error message.
32
-
Error responses also contain a `correlation_id` field which can be used to identify the request in case you need to contact support.
33
-
# Change log
34
-
For information on the latest changes to the API, please refer to the [change log](https://github.com/hostinger/api/blob/main/CHANGELOG.md).
35
-
# Support
36
-
If you have any questions, feedback or feature requests, please create an [issue](https://github.com/hostinger/api/issues) or [discussion](https://github.com/hostinger/api/discussions) on the repository.
37
-
38
-
For any support take a look at our [Github Repository](https://github.com/hostinger/api/), dedicated to the Hostinger API.
0 commit comments