|
| 1 | +# Hostinger\AgentReadinessScansApi |
| 2 | + |
| 3 | +All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path. |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +| ------------- | ------------- | ------------- | |
| 7 | +| [**getWebsiteScanV1()**](AgentReadinessScansApi.md#getWebsiteScanV1) | **GET** /api/agent-readiness/v1/scans/{domain} | Get website scan | |
| 8 | +| [**runWebsiteScanV1()**](AgentReadinessScansApi.md#runWebsiteScanV1) | **POST** /api/agent-readiness/v1/scans | Run website scan | |
| 9 | + |
| 10 | + |
| 11 | +## `getWebsiteScanV1()` |
| 12 | + |
| 13 | +```php |
| 14 | +getWebsiteScanV1($domain): \Hostinger\Model\AgentReadinessV1ScansScanResource |
| 15 | +``` |
| 16 | + |
| 17 | +Get website scan |
| 18 | + |
| 19 | +Get the latest agent readiness scan of a website.\\n Scans started with the `Run website scan` operation are asynchronous. While the status is `pending`, the result fields are null; wait a few seconds and call this operation again until the status is `completed` or `failed`. A `failed` scan is not retried; run the scan again.\\n A completed scan has a 0-100 score, a letter grade, a score per category, and the result of every check with the evidence found and how to fix it. Check names are listed by the `List checks` operation.\\n Returns 404 when the domain has never been scanned; use the `Run website scan` operation first. |
| 20 | + |
| 21 | +### Example |
| 22 | + |
| 23 | +```php |
| 24 | +<?php |
| 25 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 26 | + |
| 27 | + |
| 28 | +// Configure Bearer authorization: apiToken |
| 29 | +$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 30 | + |
| 31 | + |
| 32 | +$apiInstance = new Hostinger\Api\AgentReadinessScansApi(config: $config); |
| 33 | +$domain = example.com; // string | Domain name the scan was run for |
| 34 | + |
| 35 | +try { |
| 36 | + $result = $apiInstance->getWebsiteScanV1($domain); |
| 37 | + print_r($result); |
| 38 | +} catch (Exception $e) { |
| 39 | + echo 'Exception when calling AgentReadinessScansApi->getWebsiteScanV1: ', $e->getMessage(), PHP_EOL; |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +### Parameters |
| 44 | + |
| 45 | +| Name | Type | Description | Notes | |
| 46 | +| ------------- | ------------- | ------------- | ------------- | |
| 47 | +| **domain** | **string**| Domain name the scan was run for | | |
| 48 | + |
| 49 | +### Return type |
| 50 | + |
| 51 | +[**\Hostinger\Model\AgentReadinessV1ScansScanResource**](../Model/AgentReadinessV1ScansScanResource.md) |
| 52 | + |
| 53 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 54 | +[[Back to Model list]](../../README.md#models) |
| 55 | +[[Back to README]](../../README.md) |
| 56 | + |
| 57 | +## `runWebsiteScanV1()` |
| 58 | + |
| 59 | +```php |
| 60 | +runWebsiteScanV1($agentReadinessV1ScansRunScanRequest): \Hostinger\Model\AgentReadinessV1ScansScanResource |
| 61 | +``` |
| 62 | + |
| 63 | +Run website scan |
| 64 | + |
| 65 | +Start a scan of how ready a public website is for AI agents to discover, read and act on.\\n Scanning is asynchronous: this operation only starts the scan, and the returned scan is usually `pending` with no results yet. To get the results, poll the `Get website scan` operation with the same domain every few seconds until its status is `completed` or `failed`. The scan itself is limited to 60 seconds, plus any time it waits in the queue. A `failed` scan is not retried; run this operation again.\\n Starting a scan for a domain that already has a pending scan from the last 5 minutes returns that scan instead of starting a new one. |
| 66 | + |
| 67 | +### Example |
| 68 | + |
| 69 | +```php |
| 70 | +<?php |
| 71 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 72 | + |
| 73 | + |
| 74 | +// Configure Bearer authorization: apiToken |
| 75 | +$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 76 | + |
| 77 | + |
| 78 | +$apiInstance = new Hostinger\Api\AgentReadinessScansApi(config: $config); |
| 79 | +$agentReadinessV1ScansRunScanRequest = new \Hostinger\Model\AgentReadinessV1ScansRunScanRequest(); // \Hostinger\Model\AgentReadinessV1ScansRunScanRequest |
| 80 | + |
| 81 | +try { |
| 82 | + $result = $apiInstance->runWebsiteScanV1($agentReadinessV1ScansRunScanRequest); |
| 83 | + print_r($result); |
| 84 | +} catch (Exception $e) { |
| 85 | + echo 'Exception when calling AgentReadinessScansApi->runWebsiteScanV1: ', $e->getMessage(), PHP_EOL; |
| 86 | +} |
| 87 | +``` |
| 88 | + |
| 89 | +### Parameters |
| 90 | + |
| 91 | +| Name | Type | Description | Notes | |
| 92 | +| ------------- | ------------- | ------------- | ------------- | |
| 93 | +| **agentReadinessV1ScansRunScanRequest** | [**\Hostinger\Model\AgentReadinessV1ScansRunScanRequest**](../Model/AgentReadinessV1ScansRunScanRequest.md)| | | |
| 94 | + |
| 95 | +### Return type |
| 96 | + |
| 97 | +[**\Hostinger\Model\AgentReadinessV1ScansScanResource**](../Model/AgentReadinessV1ScansScanResource.md) |
| 98 | + |
| 99 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 100 | +[[Back to Model list]](../../README.md#models) |
| 101 | +[[Back to README]](../../README.md) |
0 commit comments