|
| 1 | +# revengai.ReportsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.reveng.ai* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**create_pdf_report**](ReportsApi.md#create_pdf_report) | **POST** /v3/analysis/{analysis_id}/pdf | Start PDF report generation |
| 8 | +[**download_pdf_report**](ReportsApi.md#download_pdf_report) | **GET** /v3/analysis/{analysis_id}/pdf/{task_id} | Download generated PDF report |
| 9 | +[**get_pdf_report_status**](ReportsApi.md#get_pdf_report_status) | **GET** /v3/analysis/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status |
| 10 | + |
| 11 | + |
| 12 | +# **create_pdf_report** |
| 13 | +> GeneratePDFOutputBody create_pdf_report(analysis_id) |
| 14 | +
|
| 15 | +Start PDF report generation |
| 16 | + |
| 17 | +Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. |
| 18 | + |
| 19 | +**Error codes:** |
| 20 | +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied |
| 21 | +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found |
| 22 | +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready |
| 23 | + |
| 24 | +### Example |
| 25 | + |
| 26 | +* Api Key Authentication (APIKey): |
| 27 | + |
| 28 | +```python |
| 29 | +import revengai |
| 30 | +from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody |
| 31 | +from revengai.rest import ApiException |
| 32 | +from pprint import pprint |
| 33 | + |
| 34 | +# Defining the host is optional and defaults to https://api.reveng.ai |
| 35 | +# See configuration.py for a list of all supported configuration parameters. |
| 36 | +configuration = revengai.Configuration( |
| 37 | + host = "https://api.reveng.ai" |
| 38 | +) |
| 39 | + |
| 40 | +# The client must configure the authentication and authorization parameters |
| 41 | +# in accordance with the API server security policy. |
| 42 | +# Examples for each auth method are provided below, use the example that |
| 43 | +# satisfies your auth use case. |
| 44 | + |
| 45 | +# Configure API key authorization: APIKey |
| 46 | +configuration.api_key['APIKey'] = os.environ["API_KEY"] |
| 47 | + |
| 48 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 49 | +# configuration.api_key_prefix['APIKey'] = 'Bearer' |
| 50 | + |
| 51 | +# Enter a context with an instance of the API client |
| 52 | +with revengai.ApiClient(configuration) as api_client: |
| 53 | + # Create an instance of the API class |
| 54 | + api_instance = revengai.ReportsApi(api_client) |
| 55 | + analysis_id = 56 # int | Analysis ID |
| 56 | + |
| 57 | + try: |
| 58 | + # Start PDF report generation |
| 59 | + api_response = api_instance.create_pdf_report(analysis_id) |
| 60 | + print("The response of ReportsApi->create_pdf_report:\n") |
| 61 | + pprint(api_response) |
| 62 | + except Exception as e: |
| 63 | + print("Exception when calling ReportsApi->create_pdf_report: %s\n" % e) |
| 64 | +``` |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +### Parameters |
| 69 | + |
| 70 | + |
| 71 | +Name | Type | Description | Notes |
| 72 | +------------- | ------------- | ------------- | ------------- |
| 73 | + **analysis_id** | **int**| Analysis ID | |
| 74 | + |
| 75 | +### Return type |
| 76 | + |
| 77 | +[**GeneratePDFOutputBody**](GeneratePDFOutputBody.md) |
| 78 | + |
| 79 | +### Authorization |
| 80 | + |
| 81 | +[APIKey](../README.md#APIKey) |
| 82 | + |
| 83 | +### HTTP request headers |
| 84 | + |
| 85 | + - **Content-Type**: Not defined |
| 86 | + - **Accept**: application/json |
| 87 | + |
| 88 | +### HTTP response details |
| 89 | + |
| 90 | +| Status code | Description | Response headers | |
| 91 | +|-------------|-------------|------------------| |
| 92 | +**202** | Accepted | - | |
| 93 | +**403** | Forbidden | - | |
| 94 | +**404** | Not Found | - | |
| 95 | +**409** | Conflict | - | |
| 96 | +**422** | Unprocessable Entity | - | |
| 97 | +**500** | Internal Server Error | - | |
| 98 | + |
| 99 | +[[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) |
| 100 | + |
| 101 | +# **download_pdf_report** |
| 102 | +> download_pdf_report(analysis_id, task_id) |
| 103 | +
|
| 104 | +Download generated PDF report |
| 105 | + |
| 106 | +Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. |
| 107 | + |
| 108 | +**Error codes:** |
| 109 | +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied |
| 110 | +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found |
| 111 | +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready |
| 112 | +- `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed |
| 113 | + |
| 114 | +### Example |
| 115 | + |
| 116 | +* Api Key Authentication (APIKey): |
| 117 | + |
| 118 | +```python |
| 119 | +import revengai |
| 120 | +from revengai.rest import ApiException |
| 121 | +from pprint import pprint |
| 122 | + |
| 123 | +# Defining the host is optional and defaults to https://api.reveng.ai |
| 124 | +# See configuration.py for a list of all supported configuration parameters. |
| 125 | +configuration = revengai.Configuration( |
| 126 | + host = "https://api.reveng.ai" |
| 127 | +) |
| 128 | + |
| 129 | +# The client must configure the authentication and authorization parameters |
| 130 | +# in accordance with the API server security policy. |
| 131 | +# Examples for each auth method are provided below, use the example that |
| 132 | +# satisfies your auth use case. |
| 133 | + |
| 134 | +# Configure API key authorization: APIKey |
| 135 | +configuration.api_key['APIKey'] = os.environ["API_KEY"] |
| 136 | + |
| 137 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 138 | +# configuration.api_key_prefix['APIKey'] = 'Bearer' |
| 139 | + |
| 140 | +# Enter a context with an instance of the API client |
| 141 | +with revengai.ApiClient(configuration) as api_client: |
| 142 | + # Create an instance of the API class |
| 143 | + api_instance = revengai.ReportsApi(api_client) |
| 144 | + analysis_id = 56 # int | Analysis ID |
| 145 | + task_id = 'task_id_example' # str | Task ID returned by the create endpoint |
| 146 | + |
| 147 | + try: |
| 148 | + # Download generated PDF report |
| 149 | + api_instance.download_pdf_report(analysis_id, task_id) |
| 150 | + except Exception as e: |
| 151 | + print("Exception when calling ReportsApi->download_pdf_report: %s\n" % e) |
| 152 | +``` |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | +### Parameters |
| 157 | + |
| 158 | + |
| 159 | +Name | Type | Description | Notes |
| 160 | +------------- | ------------- | ------------- | ------------- |
| 161 | + **analysis_id** | **int**| Analysis ID | |
| 162 | + **task_id** | **str**| Task ID returned by the create endpoint | |
| 163 | + |
| 164 | +### Return type |
| 165 | + |
| 166 | +void (empty response body) |
| 167 | + |
| 168 | +### Authorization |
| 169 | + |
| 170 | +[APIKey](../README.md#APIKey) |
| 171 | + |
| 172 | +### HTTP request headers |
| 173 | + |
| 174 | + - **Content-Type**: Not defined |
| 175 | + - **Accept**: application/json |
| 176 | + |
| 177 | +### HTTP response details |
| 178 | + |
| 179 | +| Status code | Description | Response headers | |
| 180 | +|-------------|-------------|------------------| |
| 181 | +**200** | OK | - | |
| 182 | +**403** | Forbidden | - | |
| 183 | +**404** | Not Found | - | |
| 184 | +**409** | Conflict | - | |
| 185 | +**422** | Unprocessable Entity | - | |
| 186 | +**500** | Internal Server Error | - | |
| 187 | + |
| 188 | +[[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) |
| 189 | + |
| 190 | +# **get_pdf_report_status** |
| 191 | +> WorkflowProgress get_pdf_report_status(analysis_id, task_id) |
| 192 | +
|
| 193 | +Get PDF report workflow status |
| 194 | + |
| 195 | +Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. |
| 196 | + |
| 197 | +**Error codes:** |
| 198 | +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied |
| 199 | +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found |
| 200 | + |
| 201 | +### Example |
| 202 | + |
| 203 | +* Api Key Authentication (APIKey): |
| 204 | + |
| 205 | +```python |
| 206 | +import revengai |
| 207 | +from revengai.models.workflow_progress import WorkflowProgress |
| 208 | +from revengai.rest import ApiException |
| 209 | +from pprint import pprint |
| 210 | + |
| 211 | +# Defining the host is optional and defaults to https://api.reveng.ai |
| 212 | +# See configuration.py for a list of all supported configuration parameters. |
| 213 | +configuration = revengai.Configuration( |
| 214 | + host = "https://api.reveng.ai" |
| 215 | +) |
| 216 | + |
| 217 | +# The client must configure the authentication and authorization parameters |
| 218 | +# in accordance with the API server security policy. |
| 219 | +# Examples for each auth method are provided below, use the example that |
| 220 | +# satisfies your auth use case. |
| 221 | + |
| 222 | +# Configure API key authorization: APIKey |
| 223 | +configuration.api_key['APIKey'] = os.environ["API_KEY"] |
| 224 | + |
| 225 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 226 | +# configuration.api_key_prefix['APIKey'] = 'Bearer' |
| 227 | + |
| 228 | +# Enter a context with an instance of the API client |
| 229 | +with revengai.ApiClient(configuration) as api_client: |
| 230 | + # Create an instance of the API class |
| 231 | + api_instance = revengai.ReportsApi(api_client) |
| 232 | + analysis_id = 56 # int | Analysis ID |
| 233 | + task_id = 'task_id_example' # str | Task ID returned by the create endpoint |
| 234 | + |
| 235 | + try: |
| 236 | + # Get PDF report workflow status |
| 237 | + api_response = api_instance.get_pdf_report_status(analysis_id, task_id) |
| 238 | + print("The response of ReportsApi->get_pdf_report_status:\n") |
| 239 | + pprint(api_response) |
| 240 | + except Exception as e: |
| 241 | + print("Exception when calling ReportsApi->get_pdf_report_status: %s\n" % e) |
| 242 | +``` |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | +### Parameters |
| 247 | + |
| 248 | + |
| 249 | +Name | Type | Description | Notes |
| 250 | +------------- | ------------- | ------------- | ------------- |
| 251 | + **analysis_id** | **int**| Analysis ID | |
| 252 | + **task_id** | **str**| Task ID returned by the create endpoint | |
| 253 | + |
| 254 | +### Return type |
| 255 | + |
| 256 | +[**WorkflowProgress**](WorkflowProgress.md) |
| 257 | + |
| 258 | +### Authorization |
| 259 | + |
| 260 | +[APIKey](../README.md#APIKey) |
| 261 | + |
| 262 | +### HTTP request headers |
| 263 | + |
| 264 | + - **Content-Type**: Not defined |
| 265 | + - **Accept**: application/json |
| 266 | + |
| 267 | +### HTTP response details |
| 268 | + |
| 269 | +| Status code | Description | Response headers | |
| 270 | +|-------------|-------------|------------------| |
| 271 | +**200** | OK | - | |
| 272 | +**403** | Forbidden | - | |
| 273 | +**404** | Not Found | - | |
| 274 | +**422** | Unprocessable Entity | - | |
| 275 | +**500** | Internal Server Error | - | |
| 276 | + |
| 277 | +[[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) |
| 278 | + |
0 commit comments