Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ Class | Method | HTTP request | Description
*FunctionsRenamingHistoryApi* | [**rename_function_id**](docs/FunctionsRenamingHistoryApi.md#rename_function_id) | **POST** /v2/functions/rename/{function_id} | Rename Function
*FunctionsRenamingHistoryApi* | [**revert_function_name**](docs/FunctionsRenamingHistoryApi.md#revert_function_name) | **POST** /v2/functions/history/{function_id}/{history_id} | Revert the function name
*ModelsApi* | [**get_models**](docs/ModelsApi.md#get_models) | **GET** /v2/models | Gets models
*ReportsApi* | [**create_pdf_report**](docs/ReportsApi.md#create_pdf_report) | **POST** /v3/analysis/{analysis_id}/pdf | Start PDF report generation
*ReportsApi* | [**download_pdf_report**](docs/ReportsApi.md#download_pdf_report) | **GET** /v3/analysis/{analysis_id}/pdf/{task_id} | Download generated PDF report
*ReportsApi* | [**get_pdf_report_status**](docs/ReportsApi.md#get_pdf_report_status) | **GET** /v3/analysis/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status
*SearchApi* | [**search_binaries**](docs/SearchApi.md#search_binaries) | **GET** /v2/search/binaries | Binaries search
*SearchApi* | [**search_collections**](docs/SearchApi.md#search_collections) | **GET** /v2/search/collections | Collections search
*SearchApi* | [**search_functions**](docs/SearchApi.md#search_functions) | **GET** /v2/search/functions | Functions search
Expand Down Expand Up @@ -402,6 +405,7 @@ Class | Method | HTTP request | Description
- [FunctionsDetailResponse](docs/FunctionsDetailResponse.md)
- [FunctionsListRename](docs/FunctionsListRename.md)
- [GenerateFunctionDataTypes](docs/GenerateFunctionDataTypes.md)
- [GeneratePDFOutputBody](docs/GeneratePDFOutputBody.md)
- [GenerationStatusList](docs/GenerationStatusList.md)
- [GetAiDecompilationRatingResponse](docs/GetAiDecompilationRatingResponse.md)
- [GetAiDecompilationTask](docs/GetAiDecompilationTask.md)
Expand Down
31 changes: 31 additions & 0 deletions docs/GeneratePDFOutputBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# GeneratePDFOutputBody


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**var_schema** | **str** | A URL to the JSON Schema for this object. | [optional] [readonly]
**already_running** | **bool** | True when an existing PDF generation is in progress for this analysis and user | [optional]
**task_id** | **str** | Workflow task ID β€” use to poll status and download the PDF |

## Example

```python
from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody

# TODO update the JSON string below
json = "{}"
# create an instance of GeneratePDFOutputBody from a JSON string
generate_pdf_output_body_instance = GeneratePDFOutputBody.from_json(json)
# print the JSON string representation of the object
print(GeneratePDFOutputBody.to_json())

# convert the object into a dict
generate_pdf_output_body_dict = generate_pdf_output_body_instance.to_dict()
# create an instance of GeneratePDFOutputBody from a dict
generate_pdf_output_body_from_dict = GeneratePDFOutputBody.from_dict(generate_pdf_output_body_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


278 changes: 278 additions & 0 deletions docs/ReportsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
# revengai.ReportsApi

All URIs are relative to *https://api.reveng.ai*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_pdf_report**](ReportsApi.md#create_pdf_report) | **POST** /v3/analysis/{analysis_id}/pdf | Start PDF report generation
[**download_pdf_report**](ReportsApi.md#download_pdf_report) | **GET** /v3/analysis/{analysis_id}/pdf/{task_id} | Download generated PDF report
[**get_pdf_report_status**](ReportsApi.md#get_pdf_report_status) | **GET** /v3/analysis/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status


# **create_pdf_report**
> GeneratePDFOutputBody create_pdf_report(analysis_id)

Start PDF report generation

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.

**Error codes:**
- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) β€” Access Denied
- `404` [`NOT_FOUND`](/errors/NOT_FOUND) β€” Not Found
- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) β€” Analysis Not Ready

### Example

* Api Key Authentication (APIKey):

```python
import revengai
from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody
from revengai.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'

# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.ReportsApi(api_client)
analysis_id = 56 # int | Analysis ID

try:
# Start PDF report generation
api_response = api_instance.create_pdf_report(analysis_id)
print("The response of ReportsApi->create_pdf_report:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReportsApi->create_pdf_report: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**analysis_id** | **int**| Analysis ID |

### Return type

[**GeneratePDFOutputBody**](GeneratePDFOutputBody.md)

### Authorization

[APIKey](../README.md#APIKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**202** | Accepted | - |
**403** | Forbidden | - |
**404** | Not Found | - |
**409** | Conflict | - |
**422** | Unprocessable Entity | - |
**500** | Internal Server Error | - |

[[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)

# **download_pdf_report**
> download_pdf_report(analysis_id, task_id)

Download generated PDF report

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.

**Error codes:**
- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) β€” Access Denied
- `404` [`NOT_FOUND`](/errors/NOT_FOUND) β€” Not Found
- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) β€” Analysis Not Ready
- `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) β€” Report Render Failed

### Example

* Api Key Authentication (APIKey):

```python
import revengai
from revengai.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'

# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.ReportsApi(api_client)
analysis_id = 56 # int | Analysis ID
task_id = 'task_id_example' # str | Task ID returned by the create endpoint

try:
# Download generated PDF report
api_instance.download_pdf_report(analysis_id, task_id)
except Exception as e:
print("Exception when calling ReportsApi->download_pdf_report: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**analysis_id** | **int**| Analysis ID |
**task_id** | **str**| Task ID returned by the create endpoint |

### Return type

void (empty response body)

### Authorization

[APIKey](../README.md#APIKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**403** | Forbidden | - |
**404** | Not Found | - |
**409** | Conflict | - |
**422** | Unprocessable Entity | - |
**500** | Internal Server Error | - |

[[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)

# **get_pdf_report_status**
> WorkflowProgress get_pdf_report_status(analysis_id, task_id)

Get PDF report workflow status

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.

**Error codes:**
- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) β€” Access Denied
- `404` [`NOT_FOUND`](/errors/NOT_FOUND) β€” Not Found

### Example

* Api Key Authentication (APIKey):

```python
import revengai
from revengai.models.workflow_progress import WorkflowProgress
from revengai.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'

# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.ReportsApi(api_client)
analysis_id = 56 # int | Analysis ID
task_id = 'task_id_example' # str | Task ID returned by the create endpoint

try:
# Get PDF report workflow status
api_response = api_instance.get_pdf_report_status(analysis_id, task_id)
print("The response of ReportsApi->get_pdf_report_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReportsApi->get_pdf_report_status: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**analysis_id** | **int**| Analysis ID |
**task_id** | **str**| Task ID returned by the create endpoint |

### Return type

[**WorkflowProgress**](WorkflowProgress.md)

### Authorization

[APIKey](../README.md#APIKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**403** | Forbidden | - |
**404** | Not Found | - |
**422** | Unprocessable Entity | - |
**500** | Internal Server Error | - |

[[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)

4 changes: 4 additions & 0 deletions revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"FunctionsDataTypesApi",
"FunctionsRenamingHistoryApi",
"ModelsApi",
"ReportsApi",
"SearchApi",
"ApiResponse",
"ApiClient",
Expand Down Expand Up @@ -281,6 +282,7 @@
"FunctionsDetailResponse",
"FunctionsListRename",
"GenerateFunctionDataTypes",
"GeneratePDFOutputBody",
"GenerationStatusList",
"GetAiDecompilationRatingResponse",
"GetAiDecompilationTask",
Expand Down Expand Up @@ -431,6 +433,7 @@
from revengai.api.functions_data_types_api import FunctionsDataTypesApi as FunctionsDataTypesApi
from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi as FunctionsRenamingHistoryApi
from revengai.api.models_api import ModelsApi as ModelsApi
from revengai.api.reports_api import ReportsApi as ReportsApi
from revengai.api.search_api import SearchApi as SearchApi

# import ApiClient
Expand Down Expand Up @@ -681,6 +684,7 @@
from revengai.models.functions_detail_response import FunctionsDetailResponse as FunctionsDetailResponse
from revengai.models.functions_list_rename import FunctionsListRename as FunctionsListRename
from revengai.models.generate_function_data_types import GenerateFunctionDataTypes as GenerateFunctionDataTypes
from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody as GeneratePDFOutputBody
from revengai.models.generation_status_list import GenerationStatusList as GenerationStatusList
from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse as GetAiDecompilationRatingResponse
from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask as GetAiDecompilationTask
Expand Down
1 change: 1 addition & 0 deletions revengai/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
from revengai.api.functions_data_types_api import FunctionsDataTypesApi
from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi
from revengai.api.models_api import ModelsApi
from revengai.api.reports_api import ReportsApi
from revengai.api.search_api import SearchApi

Loading