hostinger-api-sdk 1.34.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api.ts +771 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +514 -1
- package/dist/api.js +510 -9
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +514 -1
- package/dist/esm/api.js +494 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AgencyHostingMetricsApi.md +123 -0
- package/docs/AgencyHostingV1OrdersDiskUsageMetricsLimitsResource.md +22 -0
- package/docs/AgencyHostingV1OrdersDiskUsageMetricsMetricResource.md +24 -0
- package/docs/AgencyHostingV1OrdersDiskUsageMetricsMetricsResource.md +22 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsLimitsResource.md +24 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsMetricResource.md +26 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsMetricsResource.md +24 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource.md +24 -0
- package/docs/HostingListWebsiteRedirectsV1200Response.md +22 -0
- package/docs/HostingRedirectsApi.md +193 -0
- package/docs/HostingV1RedirectsCreateRedirectRequest.md +22 -0
- package/docs/HostingV1RedirectsDeleteRedirectRequest.md +20 -0
- package/docs/HostingV1RedirectsRedirectResource.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# AgencyHostingMetricsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**listAgencyPlanOrderDiskUsageMetricsV1**](#listagencyplanorderdiskusagemetricsv1) | **GET** /api/agency-hosting/v1/orders/{order_id}/disk-usage-metrics | List Agency Plan order disk usage metrics|
|
|
8
|
+
|[**listOrderResourceUsageMetricsV1**](#listorderresourceusagemetricsv1) | **GET** /api/agency-hosting/v1/orders/{order_id}/resource-usage-metrics | List order resource usage metrics|
|
|
9
|
+
|
|
10
|
+
# **listAgencyPlanOrderDiskUsageMetricsV1**
|
|
11
|
+
> AgencyHostingV1OrdersDiskUsageMetricsMetricsResource listAgencyPlanOrderDiskUsageMetricsV1()
|
|
12
|
+
|
|
13
|
+
Returns aggregated disk and inode usage for the Agency Plan order over the selected time frame, plus the plan quotas. Figures cover the whole order account. Values may be up to one hour stale. CPU, memory, and process usage are on the resource-usage-metrics endpoint.
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
AgencyHostingMetricsApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from 'hostinger-api-sdk';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new AgencyHostingMetricsApi(configuration);
|
|
25
|
+
|
|
26
|
+
let orderId: number; //Agency Plan order ID (default to undefined)
|
|
27
|
+
let timeFrameDays: 1 | 7 | 14 | 30; //Length of the window in days, ending now. Bucket size grows with the window. (optional) (default to 1)
|
|
28
|
+
|
|
29
|
+
const { status, data } = await apiInstance.listAgencyPlanOrderDiskUsageMetricsV1(
|
|
30
|
+
orderId,
|
|
31
|
+
timeFrameDays
|
|
32
|
+
);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
|Name | Type | Description | Notes|
|
|
38
|
+
|------------- | ------------- | ------------- | -------------|
|
|
39
|
+
| **orderId** | [**number**] | Agency Plan order ID | defaults to undefined|
|
|
40
|
+
| **timeFrameDays** | [**1 | 7 | 14 | 30**]**Array<1 | 7 | 14 | 30>** | Length of the window in days, ending now. Bucket size grows with the window. | (optional) defaults to 1|
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Return type
|
|
44
|
+
|
|
45
|
+
**AgencyHostingV1OrdersDiskUsageMetricsMetricsResource**
|
|
46
|
+
|
|
47
|
+
### Authorization
|
|
48
|
+
|
|
49
|
+
[apiToken](../README.md#apiToken)
|
|
50
|
+
|
|
51
|
+
### HTTP request headers
|
|
52
|
+
|
|
53
|
+
- **Content-Type**: Not defined
|
|
54
|
+
- **Accept**: application/json
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### HTTP response details
|
|
58
|
+
| Status code | Description | Response headers |
|
|
59
|
+
|-------------|-------------|------------------|
|
|
60
|
+
|**200** | Success response | - |
|
|
61
|
+
|**422** | Validation error response | - |
|
|
62
|
+
|**401** | Unauthenticated response | - |
|
|
63
|
+
|**500** | Error response | - |
|
|
64
|
+
|
|
65
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
66
|
+
|
|
67
|
+
# **listOrderResourceUsageMetricsV1**
|
|
68
|
+
> AgencyHostingV1OrdersResourceUsageMetricsMetricsResource listOrderResourceUsageMetricsV1()
|
|
69
|
+
|
|
70
|
+
Returns aggregated CPU, memory, and process usage for the Agency Plan order over the selected time frame, plus the plan quotas and a per-website breakdown. Each website is identified by uid. Suspended and deleted websites are excluded from both the order totals and the per-website breakdown. Values may be up to one hour stale. Disk and inode usage are on the disk-usage-metrics endpoint.
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import {
|
|
76
|
+
AgencyHostingMetricsApi,
|
|
77
|
+
Configuration
|
|
78
|
+
} from 'hostinger-api-sdk';
|
|
79
|
+
|
|
80
|
+
const configuration = new Configuration();
|
|
81
|
+
const apiInstance = new AgencyHostingMetricsApi(configuration);
|
|
82
|
+
|
|
83
|
+
let orderId: number; //Agency Plan order ID (default to undefined)
|
|
84
|
+
let timeFrameHours: 1 | 24 | 168 | 336 | 720; //Length of the window in hours, ending now. Bucket size grows with the window. (optional) (default to 24)
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.listOrderResourceUsageMetricsV1(
|
|
87
|
+
orderId,
|
|
88
|
+
timeFrameHours
|
|
89
|
+
);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Parameters
|
|
93
|
+
|
|
94
|
+
|Name | Type | Description | Notes|
|
|
95
|
+
|------------- | ------------- | ------------- | -------------|
|
|
96
|
+
| **orderId** | [**number**] | Agency Plan order ID | defaults to undefined|
|
|
97
|
+
| **timeFrameHours** | [**1 | 24 | 168 | 336 | 720**]**Array<1 | 24 | 168 | 336 | 720>** | Length of the window in hours, ending now. Bucket size grows with the window. | (optional) defaults to 24|
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Return type
|
|
101
|
+
|
|
102
|
+
**AgencyHostingV1OrdersResourceUsageMetricsMetricsResource**
|
|
103
|
+
|
|
104
|
+
### Authorization
|
|
105
|
+
|
|
106
|
+
[apiToken](../README.md#apiToken)
|
|
107
|
+
|
|
108
|
+
### HTTP request headers
|
|
109
|
+
|
|
110
|
+
- **Content-Type**: Not defined
|
|
111
|
+
- **Accept**: application/json
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### HTTP response details
|
|
115
|
+
| Status code | Description | Response headers |
|
|
116
|
+
|-------------|-------------|------------------|
|
|
117
|
+
|**200** | Success response | - |
|
|
118
|
+
|**422** | Validation error response | - |
|
|
119
|
+
|**401** | Unauthenticated response | - |
|
|
120
|
+
|**500** | Error response | - |
|
|
121
|
+
|
|
122
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
123
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersDiskUsageMetricsLimitsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**disk_bytes** | **number** | Disk usage quota in bytes | [optional] [default to undefined]
|
|
9
|
+
**inodes** | **number** | Inodes quota | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AgencyHostingV1OrdersDiskUsageMetricsLimitsResource } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: AgencyHostingV1OrdersDiskUsageMetricsLimitsResource = {
|
|
17
|
+
disk_bytes,
|
|
18
|
+
inodes,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersDiskUsageMetricsMetricResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**disk_bytes** | **number** | Disk usage in bytes at this sample | [optional] [default to undefined]
|
|
9
|
+
**inodes** | **number** | Number of inodes used at this sample | [optional] [default to undefined]
|
|
10
|
+
**timestamp** | **number** | Unix timestamp of the sample | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AgencyHostingV1OrdersDiskUsageMetricsMetricResource } from 'hostinger-api-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: AgencyHostingV1OrdersDiskUsageMetricsMetricResource = {
|
|
18
|
+
disk_bytes,
|
|
19
|
+
inodes,
|
|
20
|
+
timestamp,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersDiskUsageMetricsMetricsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**limits** | [**AgencyHostingV1OrdersDiskUsageMetricsLimitsResource**](AgencyHostingV1OrdersDiskUsageMetricsLimitsResource.md) | | [optional] [default to undefined]
|
|
9
|
+
**metrics** | [**Array<AgencyHostingV1OrdersDiskUsageMetricsMetricResource>**](AgencyHostingV1OrdersDiskUsageMetricsMetricResource.md) | Array of [`AgencyHosting.V1.Orders.DiskUsageMetrics.MetricResource`](#model/agencyhostingv1ordersdiskusagemetricsmetricresource) | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AgencyHostingV1OrdersDiskUsageMetricsMetricsResource } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: AgencyHostingV1OrdersDiskUsageMetricsMetricsResource = {
|
|
17
|
+
limits,
|
|
18
|
+
metrics,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersResourceUsageMetricsLimitsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**memory_bytes** | **number** | Memory usage quota in bytes | [optional] [default to undefined]
|
|
9
|
+
**cpu_percent** | **number** | CPU usage quota in percent | [optional] [default to undefined]
|
|
10
|
+
**processes** | **number** | Process usage quota | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AgencyHostingV1OrdersResourceUsageMetricsLimitsResource } from 'hostinger-api-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: AgencyHostingV1OrdersResourceUsageMetricsLimitsResource = {
|
|
18
|
+
memory_bytes,
|
|
19
|
+
cpu_percent,
|
|
20
|
+
processes,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersResourceUsageMetricsMetricResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**cpu_percent** | **number** | CPU usage percentage at this sample | [optional] [default to undefined]
|
|
9
|
+
**memory_bytes** | **number** | Memory usage in bytes at this sample | [optional] [default to undefined]
|
|
10
|
+
**processes** | **number** | Number of processes at this sample | [optional] [default to undefined]
|
|
11
|
+
**timestamp** | **number** | Unix timestamp of the sample | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AgencyHostingV1OrdersResourceUsageMetricsMetricResource } from 'hostinger-api-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: AgencyHostingV1OrdersResourceUsageMetricsMetricResource = {
|
|
19
|
+
cpu_percent,
|
|
20
|
+
memory_bytes,
|
|
21
|
+
processes,
|
|
22
|
+
timestamp,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersResourceUsageMetricsMetricsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**limits** | [**AgencyHostingV1OrdersResourceUsageMetricsLimitsResource**](AgencyHostingV1OrdersResourceUsageMetricsLimitsResource.md) | | [optional] [default to undefined]
|
|
9
|
+
**metrics** | [**Array<AgencyHostingV1OrdersResourceUsageMetricsMetricResource>**](AgencyHostingV1OrdersResourceUsageMetricsMetricResource.md) | Array of [`AgencyHosting.V1.Orders.ResourceUsageMetrics.MetricResource`](#model/agencyhostingv1ordersresourceusagemetricsmetricresource) | [optional] [default to undefined]
|
|
10
|
+
**websites** | [**Array<AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource>**](AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource.md) | Array of [`AgencyHosting.V1.Orders.ResourceUsageMetrics.WebsiteResource`](#model/agencyhostingv1ordersresourceusagemetricswebsiteresource) | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AgencyHostingV1OrdersResourceUsageMetricsMetricsResource } from 'hostinger-api-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: AgencyHostingV1OrdersResourceUsageMetricsMetricsResource = {
|
|
18
|
+
limits,
|
|
19
|
+
metrics,
|
|
20
|
+
websites,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**uid** | **string** | Website UID | [optional] [default to undefined]
|
|
9
|
+
**domains** | **Array<string>** | Domains associated with the website | [optional] [default to undefined]
|
|
10
|
+
**metrics** | [**Array<AgencyHostingV1OrdersResourceUsageMetricsMetricResource>**](AgencyHostingV1OrdersResourceUsageMetricsMetricResource.md) | Array of [`AgencyHosting.V1.Orders.ResourceUsageMetrics.MetricResource`](#model/agencyhostingv1ordersresourceusagemetricsmetricresource) | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource } from 'hostinger-api-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource = {
|
|
18
|
+
uid,
|
|
19
|
+
domains,
|
|
20
|
+
metrics,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingListWebsiteRedirectsV1200Response
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**data** | [**Array<HostingV1RedirectsRedirectResource>**](HostingV1RedirectsRedirectResource.md) | Array of [`Hosting.V1.Redirects.RedirectResource`](#model/hostingv1redirectsredirectresource) | [optional] [default to undefined]
|
|
9
|
+
**meta** | [**CommonSchemaPaginationMetaSchema**](CommonSchemaPaginationMetaSchema.md) | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingListWebsiteRedirectsV1200Response } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingListWebsiteRedirectsV1200Response = {
|
|
17
|
+
data,
|
|
18
|
+
meta,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# HostingRedirectsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createWebsiteRedirectV1**](#createwebsiteredirectv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Create website redirect|
|
|
8
|
+
|[**deleteWebsiteRedirectV1**](#deletewebsiteredirectv1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Delete website redirect|
|
|
9
|
+
|[**listWebsiteRedirectsV1**](#listwebsiteredirectsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | List website redirects|
|
|
10
|
+
|
|
11
|
+
# **createWebsiteRedirectV1**
|
|
12
|
+
> HostingV1RedirectsRedirectResource createWebsiteRedirectV1(hostingV1RedirectsCreateRedirectRequest)
|
|
13
|
+
|
|
14
|
+
Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
HostingRedirectsApi,
|
|
21
|
+
Configuration,
|
|
22
|
+
HostingV1RedirectsCreateRedirectRequest
|
|
23
|
+
} from 'hostinger-api-sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new HostingRedirectsApi(configuration);
|
|
27
|
+
|
|
28
|
+
let username: string; // (default to undefined)
|
|
29
|
+
let domain: string; //Domain name (default to undefined)
|
|
30
|
+
let hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest; //
|
|
31
|
+
|
|
32
|
+
const { status, data } = await apiInstance.createWebsiteRedirectV1(
|
|
33
|
+
username,
|
|
34
|
+
domain,
|
|
35
|
+
hostingV1RedirectsCreateRedirectRequest
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Parameters
|
|
40
|
+
|
|
41
|
+
|Name | Type | Description | Notes|
|
|
42
|
+
|------------- | ------------- | ------------- | -------------|
|
|
43
|
+
| **hostingV1RedirectsCreateRedirectRequest** | **HostingV1RedirectsCreateRedirectRequest**| | |
|
|
44
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
45
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**HostingV1RedirectsRedirectResource**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
[apiToken](../README.md#apiToken)
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: application/json
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
|**200** | Success response | - |
|
|
66
|
+
|**422** | Validation error response | - |
|
|
67
|
+
|**401** | Unauthenticated response | - |
|
|
68
|
+
|**500** | Error response | - |
|
|
69
|
+
|
|
70
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
71
|
+
|
|
72
|
+
# **deleteWebsiteRedirectV1**
|
|
73
|
+
> CommonSuccessEmptyResource deleteWebsiteRedirectV1()
|
|
74
|
+
|
|
75
|
+
Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
76
|
+
|
|
77
|
+
### Example
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import {
|
|
81
|
+
HostingRedirectsApi,
|
|
82
|
+
Configuration
|
|
83
|
+
} from 'hostinger-api-sdk';
|
|
84
|
+
|
|
85
|
+
const configuration = new Configuration();
|
|
86
|
+
const apiInstance = new HostingRedirectsApi(configuration);
|
|
87
|
+
|
|
88
|
+
let username: string; // (default to undefined)
|
|
89
|
+
let domain: string; //Domain name (default to undefined)
|
|
90
|
+
let from: string; //Source URL returned by the list redirects endpoint. (default to undefined)
|
|
91
|
+
|
|
92
|
+
const { status, data } = await apiInstance.deleteWebsiteRedirectV1(
|
|
93
|
+
username,
|
|
94
|
+
domain,
|
|
95
|
+
from
|
|
96
|
+
);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Parameters
|
|
100
|
+
|
|
101
|
+
|Name | Type | Description | Notes|
|
|
102
|
+
|------------- | ------------- | ------------- | -------------|
|
|
103
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
104
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
105
|
+
| **from** | [**string**] | Source URL returned by the list redirects endpoint. | defaults to undefined|
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Return type
|
|
109
|
+
|
|
110
|
+
**CommonSuccessEmptyResource**
|
|
111
|
+
|
|
112
|
+
### Authorization
|
|
113
|
+
|
|
114
|
+
[apiToken](../README.md#apiToken)
|
|
115
|
+
|
|
116
|
+
### HTTP request headers
|
|
117
|
+
|
|
118
|
+
- **Content-Type**: Not defined
|
|
119
|
+
- **Accept**: application/json
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### HTTP response details
|
|
123
|
+
| Status code | Description | Response headers |
|
|
124
|
+
|-------------|-------------|------------------|
|
|
125
|
+
|**200** | Success empty response | - |
|
|
126
|
+
|**422** | Validation error response | - |
|
|
127
|
+
|**401** | Unauthenticated response | - |
|
|
128
|
+
|**500** | Error response | - |
|
|
129
|
+
|
|
130
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
131
|
+
|
|
132
|
+
# **listWebsiteRedirectsV1**
|
|
133
|
+
> HostingListWebsiteRedirectsV1200Response listWebsiteRedirectsV1()
|
|
134
|
+
|
|
135
|
+
Returns a paginated list of redirects configured for the selected website.
|
|
136
|
+
|
|
137
|
+
### Example
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import {
|
|
141
|
+
HostingRedirectsApi,
|
|
142
|
+
Configuration
|
|
143
|
+
} from 'hostinger-api-sdk';
|
|
144
|
+
|
|
145
|
+
const configuration = new Configuration();
|
|
146
|
+
const apiInstance = new HostingRedirectsApi(configuration);
|
|
147
|
+
|
|
148
|
+
let username: string; // (default to undefined)
|
|
149
|
+
let domain: string; //Domain name (default to undefined)
|
|
150
|
+
let page: number; //Page number (optional) (default to undefined)
|
|
151
|
+
let perPage: number; //Number of items per page (optional) (default to 25)
|
|
152
|
+
|
|
153
|
+
const { status, data } = await apiInstance.listWebsiteRedirectsV1(
|
|
154
|
+
username,
|
|
155
|
+
domain,
|
|
156
|
+
page,
|
|
157
|
+
perPage
|
|
158
|
+
);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Parameters
|
|
162
|
+
|
|
163
|
+
|Name | Type | Description | Notes|
|
|
164
|
+
|------------- | ------------- | ------------- | -------------|
|
|
165
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
166
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
167
|
+
| **page** | [**number**] | Page number | (optional) defaults to undefined|
|
|
168
|
+
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
### Return type
|
|
172
|
+
|
|
173
|
+
**HostingListWebsiteRedirectsV1200Response**
|
|
174
|
+
|
|
175
|
+
### Authorization
|
|
176
|
+
|
|
177
|
+
[apiToken](../README.md#apiToken)
|
|
178
|
+
|
|
179
|
+
### HTTP request headers
|
|
180
|
+
|
|
181
|
+
- **Content-Type**: Not defined
|
|
182
|
+
- **Accept**: application/json
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### HTTP response details
|
|
186
|
+
| Status code | Description | Response headers |
|
|
187
|
+
|-------------|-------------|------------------|
|
|
188
|
+
|**200** | Success response | - |
|
|
189
|
+
|**401** | Unauthenticated response | - |
|
|
190
|
+
|**500** | Error response | - |
|
|
191
|
+
|
|
192
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
193
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1RedirectsCreateRedirectRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**from** | **string** | Source URL on the selected website | [default to undefined]
|
|
9
|
+
**to** | **string** | Destination URL or IP address | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1RedirectsCreateRedirectRequest } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1RedirectsCreateRedirectRequest = {
|
|
17
|
+
from,
|
|
18
|
+
to,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# HostingV1RedirectsDeleteRedirectRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**from** | **string** | Source URL returned by the list redirects endpoint | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { HostingV1RedirectsDeleteRedirectRequest } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: HostingV1RedirectsDeleteRedirectRequest = {
|
|
16
|
+
from,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1RedirectsRedirectResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**from** | **string** | Source URL | [optional] [default to undefined]
|
|
9
|
+
**to** | **string** | Destination URL | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1RedirectsRedirectResource } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1RedirectsRedirectResource = {
|
|
17
|
+
from,
|
|
18
|
+
to,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.38.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|