|
| 1 | +# hostinger_api.AgentReadinessScansApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**get_website_scan_v1**](AgentReadinessScansApi.md#get_website_scan_v1) | **GET** /api/agent-readiness/v1/scans/{domain} | Get website scan |
| 8 | +[**run_website_scan_v1**](AgentReadinessScansApi.md#run_website_scan_v1) | **POST** /api/agent-readiness/v1/scans | Run website scan |
| 9 | + |
| 10 | + |
| 11 | +# **get_website_scan_v1** |
| 12 | +> AgentReadinessV1ScansScanResource get_website_scan_v1(domain) |
| 13 | +
|
| 14 | +Get website scan |
| 15 | + |
| 16 | +Get the latest agent readiness scan of a website.\n |
| 17 | +Scans started with the `Run website scan` operation are asynchronous. While the status is `pending`, |
| 18 | +the result fields are null; wait a few seconds and call this operation again until the status is |
| 19 | +`completed` or `failed`. A `failed` scan is not retried; run the scan again.\n |
| 20 | +A completed scan has a 0-100 score, a letter grade, a score per category, and the result of every |
| 21 | +check with the evidence found and how to fix it. Check names are listed by the `List checks` operation.\n |
| 22 | +Returns 404 when the domain has never been scanned; use the `Run website scan` operation first. |
| 23 | + |
| 24 | +### Example |
| 25 | + |
| 26 | +* Bearer Authentication (apiToken): |
| 27 | + |
| 28 | +```python |
| 29 | +import hostinger_api |
| 30 | +from hostinger_api.models.agent_readiness_v1_scans_scan_resource import AgentReadinessV1ScansScanResource |
| 31 | +from hostinger_api.rest import ApiException |
| 32 | +from pprint import pprint |
| 33 | + |
| 34 | + |
| 35 | +# Configure Bearer authorization: apiToken |
| 36 | +configuration = hostinger_api.Configuration( |
| 37 | + access_token = os.environ["BEARER_TOKEN"] |
| 38 | +) |
| 39 | + |
| 40 | +# Enter a context with an instance of the API client |
| 41 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 42 | + # Create an instance of the API class |
| 43 | + api_instance = hostinger_api.AgentReadinessScansApi(api_client) |
| 44 | + domain = 'example.com' # str | Domain name the scan was run for |
| 45 | + |
| 46 | + try: |
| 47 | + # Get website scan |
| 48 | + api_response = api_instance.get_website_scan_v1(domain) |
| 49 | + print("The response of AgentReadinessScansApi->get_website_scan_v1:\n") |
| 50 | + pprint(api_response) |
| 51 | + except Exception as e: |
| 52 | + print("Exception when calling AgentReadinessScansApi->get_website_scan_v1: %s\n" % e) |
| 53 | +``` |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +### Parameters |
| 58 | + |
| 59 | + |
| 60 | +Name | Type | Description | Notes |
| 61 | +------------- | ------------- | ------------- | ------------- |
| 62 | + **domain** | **str**| Domain name the scan was run for | |
| 63 | + |
| 64 | +### Return type |
| 65 | + |
| 66 | +[**AgentReadinessV1ScansScanResource**](AgentReadinessV1ScansScanResource.md) |
| 67 | + |
| 68 | +### Authorization |
| 69 | + |
| 70 | +[apiToken](../README.md#apiToken) |
| 71 | + |
| 72 | +### HTTP request headers |
| 73 | + |
| 74 | + - **Content-Type**: Not defined |
| 75 | + - **Accept**: application/json |
| 76 | + |
| 77 | +### HTTP response details |
| 78 | + |
| 79 | +| Status code | Description | Response headers | |
| 80 | +|-------------|-------------|------------------| |
| 81 | +**200** | Success response | - | |
| 82 | +**401** | Unauthenticated response | - | |
| 83 | +**500** | Error response | - | |
| 84 | + |
| 85 | +[[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) |
| 86 | + |
| 87 | +# **run_website_scan_v1** |
| 88 | +> AgentReadinessV1ScansScanResource run_website_scan_v1(agent_readiness_v1_scans_run_scan_request) |
| 89 | +
|
| 90 | +Run website scan |
| 91 | + |
| 92 | +Start a scan of how ready a public website is for AI agents to discover, read and act on.\n |
| 93 | +Scanning is asynchronous: this operation only starts the scan, and the returned scan is usually `pending` |
| 94 | +with no results yet. To get the results, poll the `Get website scan` operation with the same domain every |
| 95 | +few seconds until its status is `completed` or `failed`. The scan itself is limited to 60 seconds, |
| 96 | +plus any time it waits in the queue. A `failed` scan is not retried; run this operation again.\n |
| 97 | +Starting a scan for a domain that already has a pending scan from the last 5 minutes |
| 98 | +returns that scan instead of starting a new one. |
| 99 | + |
| 100 | +### Example |
| 101 | + |
| 102 | +* Bearer Authentication (apiToken): |
| 103 | + |
| 104 | +```python |
| 105 | +import hostinger_api |
| 106 | +from hostinger_api.models.agent_readiness_v1_scans_run_scan_request import AgentReadinessV1ScansRunScanRequest |
| 107 | +from hostinger_api.models.agent_readiness_v1_scans_scan_resource import AgentReadinessV1ScansScanResource |
| 108 | +from hostinger_api.rest import ApiException |
| 109 | +from pprint import pprint |
| 110 | + |
| 111 | + |
| 112 | +# Configure Bearer authorization: apiToken |
| 113 | +configuration = hostinger_api.Configuration( |
| 114 | + access_token = os.environ["BEARER_TOKEN"] |
| 115 | +) |
| 116 | + |
| 117 | +# Enter a context with an instance of the API client |
| 118 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 119 | + # Create an instance of the API class |
| 120 | + api_instance = hostinger_api.AgentReadinessScansApi(api_client) |
| 121 | + agent_readiness_v1_scans_run_scan_request = hostinger_api.AgentReadinessV1ScansRunScanRequest() # AgentReadinessV1ScansRunScanRequest | |
| 122 | + |
| 123 | + try: |
| 124 | + # Run website scan |
| 125 | + api_response = api_instance.run_website_scan_v1(agent_readiness_v1_scans_run_scan_request) |
| 126 | + print("The response of AgentReadinessScansApi->run_website_scan_v1:\n") |
| 127 | + pprint(api_response) |
| 128 | + except Exception as e: |
| 129 | + print("Exception when calling AgentReadinessScansApi->run_website_scan_v1: %s\n" % e) |
| 130 | +``` |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | +### Parameters |
| 135 | + |
| 136 | + |
| 137 | +Name | Type | Description | Notes |
| 138 | +------------- | ------------- | ------------- | ------------- |
| 139 | + **agent_readiness_v1_scans_run_scan_request** | [**AgentReadinessV1ScansRunScanRequest**](AgentReadinessV1ScansRunScanRequest.md)| | |
| 140 | + |
| 141 | +### Return type |
| 142 | + |
| 143 | +[**AgentReadinessV1ScansScanResource**](AgentReadinessV1ScansScanResource.md) |
| 144 | + |
| 145 | +### Authorization |
| 146 | + |
| 147 | +[apiToken](../README.md#apiToken) |
| 148 | + |
| 149 | +### HTTP request headers |
| 150 | + |
| 151 | + - **Content-Type**: application/json |
| 152 | + - **Accept**: application/json |
| 153 | + |
| 154 | +### HTTP response details |
| 155 | + |
| 156 | +| Status code | Description | Response headers | |
| 157 | +|-------------|-------------|------------------| |
| 158 | +**200** | Success response | - | |
| 159 | +**422** | Validation error response | - | |
| 160 | +**401** | Unauthenticated response | - | |
| 161 | +**500** | Error response | - | |
| 162 | + |
| 163 | +[[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) |
| 164 | + |
0 commit comments