|
| 1 | +# hostinger_api.HostingHeadlessApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**submit_headless_build_report_v1**](HostingHeadlessApi.md#submit_headless_build_report_v1) | **POST** /api/hosting/v1/headless/agent-reports | Submit headless build report |
| 8 | + |
| 9 | + |
| 10 | +# **submit_headless_build_report_v1** |
| 11 | +> HostingV1HeadlessAgentReportResource submit_headless_build_report_v1(hosting_v1_headless_store_agent_report_request) |
| 12 | +
|
| 13 | +Submit headless build report |
| 14 | + |
| 15 | +Submits the build report the headless skill writes at the end of a run (including early |
| 16 | +stops), so Hostinger can learn where builds get stuck. Send one report per call, with the |
| 17 | +report JSON as the request body, unchanged. Only send a report when the user agreed to it. |
| 18 | + |
| 19 | +The report must match report.schema.json v1; an invalid report returns 422 and is not |
| 20 | +stored. The report is linked to the authenticated account, so do not add account details |
| 21 | +to it. |
| 22 | + |
| 23 | +### Example |
| 24 | + |
| 25 | +* Bearer Authentication (apiToken): |
| 26 | + |
| 27 | +```python |
| 28 | +import hostinger_api |
| 29 | +from hostinger_api.models.hosting_v1_headless_agent_report_resource import HostingV1HeadlessAgentReportResource |
| 30 | +from hostinger_api.models.hosting_v1_headless_store_agent_report_request import HostingV1HeadlessStoreAgentReportRequest |
| 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.HostingHeadlessApi(api_client) |
| 44 | + hosting_v1_headless_store_agent_report_request = hostinger_api.HostingV1HeadlessStoreAgentReportRequest() # HostingV1HeadlessStoreAgentReportRequest | |
| 45 | + |
| 46 | + try: |
| 47 | + # Submit headless build report |
| 48 | + api_response = api_instance.submit_headless_build_report_v1(hosting_v1_headless_store_agent_report_request) |
| 49 | + print("The response of HostingHeadlessApi->submit_headless_build_report_v1:\n") |
| 50 | + pprint(api_response) |
| 51 | + except Exception as e: |
| 52 | + print("Exception when calling HostingHeadlessApi->submit_headless_build_report_v1: %s\n" % e) |
| 53 | +``` |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +### Parameters |
| 58 | + |
| 59 | + |
| 60 | +Name | Type | Description | Notes |
| 61 | +------------- | ------------- | ------------- | ------------- |
| 62 | + **hosting_v1_headless_store_agent_report_request** | [**HostingV1HeadlessStoreAgentReportRequest**](HostingV1HeadlessStoreAgentReportRequest.md)| | |
| 63 | + |
| 64 | +### Return type |
| 65 | + |
| 66 | +[**HostingV1HeadlessAgentReportResource**](HostingV1HeadlessAgentReportResource.md) |
| 67 | + |
| 68 | +### Authorization |
| 69 | + |
| 70 | +[apiToken](../README.md#apiToken) |
| 71 | + |
| 72 | +### HTTP request headers |
| 73 | + |
| 74 | + - **Content-Type**: application/json |
| 75 | + - **Accept**: application/json |
| 76 | + |
| 77 | +### HTTP response details |
| 78 | + |
| 79 | +| Status code | Description | Response headers | |
| 80 | +|-------------|-------------|------------------| |
| 81 | +**201** | Created response | - | |
| 82 | +**422** | Validation error response | - | |
| 83 | +**401** | Unauthenticated response | - | |
| 84 | +**500** | Error response | - | |
| 85 | + |
| 86 | +[[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) |
| 87 | + |
0 commit comments