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
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.8.1
v3.12.0
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>ai.reveng</groupId>
<artifactId>sdk</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -31,7 +31,7 @@ repositories {
}

dependencies {
implementation "ai.reveng:sdk:3.8.1"
implementation "ai.reveng:sdk:3.12.0"
}
```

Expand Down Expand Up @@ -87,6 +87,7 @@ Class | Method | HTTP request | Description
*AnalysesCoreApi* | [**getAnalysisLogs**](docs/AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis
*AnalysesCoreApi* | [**getAnalysisParams**](docs/AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information
*AnalysesCoreApi* | [**getAnalysisStatus**](docs/AnalysesCoreApi.md#getAnalysisStatus) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis
*AnalysesCoreApi* | [**insertAnalysisLog**](docs/AnalysesCoreApi.md#insertAnalysisLog) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis
*AnalysesCoreApi* | [**listAnalyses**](docs/AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses
*AnalysesCoreApi* | [**lookupBinaryId**](docs/AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID
*AnalysesCoreApi* | [**requeueAnalysis**](docs/AnalysesCoreApi.md#requeueAnalysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis
Expand Down Expand Up @@ -399,6 +400,7 @@ Class | Method | HTTP request | Description
- [ISA](docs/ISA.md)
- [IconModel](docs/IconModel.md)
- [ImportModel](docs/ImportModel.md)
- [InsertAnalysisLogRequest](docs/InsertAnalysisLogRequest.md)
- [InverseFunctionMapItem](docs/InverseFunctionMapItem.md)
- [InverseStringMapItem](docs/InverseStringMapItem.md)
- [InverseValue](docs/InverseValue.md)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'ai.reveng'
version = '3.8.1'
version = '3.12.0'



Expand Down Expand Up @@ -171,7 +171,7 @@ mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

coordinates("ai.reveng", "sdk", "3.8.1")
coordinates("ai.reveng", "sdk", "3.12.0")

pom {
name = "sdk"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ai.reveng",
name := "sdk",
version := "3.8.1",
version := "3.12.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
73 changes: 73 additions & 0 deletions docs/AnalysesCoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All URIs are relative to *https://api.reveng.ai*
| [**getAnalysisLogs**](AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis |
| [**getAnalysisParams**](AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information |
| [**getAnalysisStatus**](AnalysesCoreApi.md#getAnalysisStatus) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis |
| [**insertAnalysisLog**](AnalysesCoreApi.md#insertAnalysisLog) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis |
| [**listAnalyses**](AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses |
| [**lookupBinaryId**](AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID |
| [**requeueAnalysis**](AnalysesCoreApi.md#requeueAnalysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis |
Expand Down Expand Up @@ -515,6 +516,78 @@ public class Example {
| **200** | Successful Response | - |
| **422** | Invalid request parameters | - |

<a id="insertAnalysisLog"></a>
# **insertAnalysisLog**
> BaseResponse insertAnalysisLog(analysisId, insertAnalysisLogRequest)

Insert a log entry for an analysis

Inserts a log record for an analysis. Only the analysis owner can insert logs.

### Example
```java
// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.AnalysesCoreApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.reveng.ai");

// Configure API key authorization: APIKey
ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
APIKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.setApiKeyPrefix("Token");

AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient);
Integer analysisId = 56; // Integer |
InsertAnalysisLogRequest insertAnalysisLogRequest = new InsertAnalysisLogRequest(); // InsertAnalysisLogRequest |
try {
BaseResponse result = apiInstance.insertAnalysisLog(analysisId, insertAnalysisLogRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnalysesCoreApi#insertAnalysisLog");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **analysisId** | **Integer**| | |
| **insertAnalysisLogRequest** | [**InsertAnalysisLogRequest**](InsertAnalysisLogRequest.md)| | |

### Return type

[**BaseResponse**](BaseResponse.md)

### Authorization

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

### HTTP request headers

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

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **201** | Successful Response | - |
| **422** | Invalid request parameters | - |

<a id="listAnalyses"></a>
# **listAnalyses**
> BaseResponseRecent listAnalyses(searchTerm, workspace, status, modelName, dynamicExecutionStatus, usernames, sha256Hash, limit, offset, orderBy, order)
Expand Down
2 changes: 1 addition & 1 deletion docs/BaseResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**status** | **Boolean** | Response status on whether the request succeeded | [optional] |
|**data** | [**AnyOf**](AnyOf.md) | Response data | [optional] |
|**data** | **Object** | | [optional] |
|**message** | **String** | | [optional] |
|**errors** | [**List&lt;ErrorModel&gt;**](ErrorModel.md) | | [optional] |
|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] |
Expand Down
1 change: 1 addition & 0 deletions docs/Basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**binaryId** | **Integer** | The ID of the binary | |
|**binaryName** | **String** | The name of the binary uploaded | |
|**binarySize** | **Integer** | The size of the binary uploaded (bytes) | |
|**creation** | **OffsetDateTime** | When the binary was uploaded | |
Expand Down
13 changes: 13 additions & 0 deletions docs/InsertAnalysisLogRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# InsertAnalysisLogRequest


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**log** | **String** | The log message to insert for the analysis | |



6 changes: 6 additions & 0 deletions docs/ModelName.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@

* `BINNET_0_7_ARM_64_LINUX` (value: `"binnet-0.7-arm-64-linux"`)

* `BINNET_0_7_X86_64_ANDROID` (value: `"binnet-0.7-x86-64-android"`)

* `BINNET_0_7_X86_32_ANDROID` (value: `"binnet-0.7-x86-32-android"`)

* `BINNET_0_7_ARM_64_ANDROID` (value: `"binnet-0.7-arm-64-android"`)



2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sdk</artifactId>
<packaging>jar</packaging>
<name>sdk</name>
<version>3.8.1</version>
<version>3.12.0</version>
<url>https://github.com/RevEngAI/sdk-java</url>
<description>Java SDK for the RevEng.AI API</description>
<scm>
Expand Down
142 changes: 142 additions & 0 deletions src/main/java/ai/reveng/api/AnalysesCoreApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import ai.reveng.model.BaseResponseUploadResponse;
import ai.reveng.model.DynamicExecutionStatusInput;
import java.io.File;
import ai.reveng.model.InsertAnalysisLogRequest;
import ai.reveng.model.ModelName;
import ai.reveng.model.Order;
import ai.reveng.model.ReAnalysisForm;
Expand Down Expand Up @@ -1037,6 +1038,147 @@ public okhttp3.Call getAnalysisStatusAsync(@javax.annotation.Nonnull Integer ana
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for insertAnalysisLog
* @param analysisId (required)
* @param insertAnalysisLogRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public okhttp3.Call insertAnalysisLogCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull InsertAnalysisLogRequest insertAnalysisLogRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };

// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = insertAnalysisLogRequest;

// create path and map variables
String localVarPath = "/v2/analyses/{analysis_id}/logs"
.replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}

String[] localVarAuthNames = new String[] { "APIKey" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call insertAnalysisLogValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull InsertAnalysisLogRequest insertAnalysisLogRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'analysisId' is set
if (analysisId == null) {
throw new ApiException("Missing the required parameter 'analysisId' when calling insertAnalysisLog(Async)");
}

// verify the required parameter 'insertAnalysisLogRequest' is set
if (insertAnalysisLogRequest == null) {
throw new ApiException("Missing the required parameter 'insertAnalysisLogRequest' when calling insertAnalysisLog(Async)");
}

return insertAnalysisLogCall(analysisId, insertAnalysisLogRequest, _callback);

}

/**
* Insert a log entry for an analysis
* Inserts a log record for an analysis. Only the analysis owner can insert logs.
* @param analysisId (required)
* @param insertAnalysisLogRequest (required)
* @return BaseResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public BaseResponse insertAnalysisLog(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull InsertAnalysisLogRequest insertAnalysisLogRequest) throws ApiException {
ApiResponse<BaseResponse> localVarResp = insertAnalysisLogWithHttpInfo(analysisId, insertAnalysisLogRequest);
return localVarResp.getData();
}

/**
* Insert a log entry for an analysis
* Inserts a log record for an analysis. Only the analysis owner can insert logs.
* @param analysisId (required)
* @param insertAnalysisLogRequest (required)
* @return ApiResponse&lt;BaseResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public ApiResponse<BaseResponse> insertAnalysisLogWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull InsertAnalysisLogRequest insertAnalysisLogRequest) throws ApiException {
okhttp3.Call localVarCall = insertAnalysisLogValidateBeforeCall(analysisId, insertAnalysisLogRequest, null);
Type localVarReturnType = new TypeToken<BaseResponse>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Insert a log entry for an analysis (asynchronously)
* Inserts a log record for an analysis. Only the analysis owner can insert logs.
* @param analysisId (required)
* @param insertAnalysisLogRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public okhttp3.Call insertAnalysisLogAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull InsertAnalysisLogRequest insertAnalysisLogRequest, final ApiCallback<BaseResponse> _callback) throws ApiException {

okhttp3.Call localVarCall = insertAnalysisLogValidateBeforeCall(analysisId, insertAnalysisLogRequest, _callback);
Type localVarReturnType = new TypeToken<BaseResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for listAnalyses
* @param searchTerm (optional, default to )
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/3.8.1/java");
setUserAgent("OpenAPI-Generator/3.12.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "3.8.1";
public static final String VERSION = "3.12.0";

private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ai/reveng/invoker/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GlobalVariable.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.IconModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ImportModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.InsertAnalysisLogRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.InverseFunctionMapItem.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.InverseStringMapItem.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.InverseValue.CustomTypeAdapterFactory());
Expand Down
Loading