Skip to content

Latest commit

 

History

History
917 lines (726 loc) · 41.1 KB

File metadata and controls

917 lines (726 loc) · 41.1 KB

DataTypesApi

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

Method HTTP request Description
v3CopyFunctionSignatures POST /v3/analyses/{analysis_id}/signatures/copy Copy function signatures
v3CreateAnalysisDataTypes POST /v3/analyses/{analysis_id}/data-types Create an analysis's data types
v3GetAnalysisDataType GET /v3/analyses/{analysis_id}/data-types/{data_type_id} Get one of an analysis's data types
v3GetAnalysisDataTypeHistory GET /v3/analyses/{analysis_id}/data-types/{data_type_id}/history Get a data type's edit history
v3GetFunctionSignature GET /v3/analyses/{analysis_id}/functions/{function_id}/signature Get a function's signature
v3GetFunctionSignatureHistory GET /v3/analyses/{analysis_id}/functions/{function_id}/signature/history Get a function signature's edit history
v3ListAnalysisDataTypes GET /v3/analyses/{analysis_id}/data-types List an analysis's data types
v3ListDataTypeFunctions GET /v3/analyses/{analysis_id}/data-types/{data_type_id}/functions List the functions using a data type
v3ListFunctionSignatures GET /v3/functions/signatures Get signatures for many functions
v3UpdateAnalysisDataTypes PUT /v3/analyses/{analysis_id}/data-types Update an analysis's data types
v3UpdateFunctionSignature PUT /v3/analyses/{analysis_id}/functions/{function_id}/signature Update a function's signature

v3CopyFunctionSignatures

CopyFunctionSignaturesOutputBody v3CopyFunctionSignatures(analysisId, copyFunctionSignaturesInputBody)

Copy function signatures

Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `400` `BAD_REQUEST` — Bad Request - `409` `CONFLICT` — Conflict - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    CopyFunctionSignaturesInputBody copyFunctionSignaturesInputBody = new CopyFunctionSignaturesInputBody(); // CopyFunctionSignaturesInputBody | 
    try {
      CopyFunctionSignaturesOutputBody result = apiInstance.v3CopyFunctionSignatures(analysisId, copyFunctionSignaturesInputBody);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3CopyFunctionSignatures");
      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 Long Analysis ID
copyFunctionSignaturesInputBody CopyFunctionSignaturesInputBody

Return type

CopyFunctionSignaturesOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

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

v3CreateAnalysisDataTypes

AnalysisDataTypesOutputBody v3CreateAnalysisDataTypes(analysisId, createAnalysisDataTypesInputBody)

Create an analysis's data types

Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `400` `BAD_REQUEST` — Bad Request - `409` `CONFLICT` — Conflict - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    CreateAnalysisDataTypesInputBody createAnalysisDataTypesInputBody = new CreateAnalysisDataTypesInputBody(); // CreateAnalysisDataTypesInputBody | 
    try {
      AnalysisDataTypesOutputBody result = apiInstance.v3CreateAnalysisDataTypes(analysisId, createAnalysisDataTypesInputBody);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3CreateAnalysisDataTypes");
      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 Long Analysis ID
createAnalysisDataTypesInputBody CreateAnalysisDataTypesInputBody

Return type

AnalysisDataTypesOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
500 Internal Server Error -

v3GetAnalysisDataType

DataTypeEntry v3GetAnalysisDataType(analysisId, dataTypeId)

Get one of an analysis's data types

Returns a single data type by its `data_type_id`, byte-identical to the entry the data types list returns for it — same variant, same fields, same definition — so a client can cache and invalidate rows from either endpoint interchangeably. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long dataTypeId = 56L; // Long | Data type ID, as returned by the data types list for this analysis. 0 is a valid id.
    try {
      DataTypeEntry result = apiInstance.v3GetAnalysisDataType(analysisId, dataTypeId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3GetAnalysisDataType");
      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 Long Analysis ID
dataTypeId Long Data type ID, as returned by the data types list for this analysis. 0 is a valid id.

Return type

DataTypeEntry

Authorization

APIKey, bearerAuth

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 -

v3GetAnalysisDataTypeHistory

GetDataTypeHistoryBody v3GetAnalysisDataTypeHistory(analysisId, dataTypeId)

Get a data type's edit history

The versions a data type has held, newest first, each attributed to the edit that wrote it. The first value is the current value. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long dataTypeId = 56L; // Long | Data type ID, as returned by the data types list for this analysis. 0 is a valid id.
    try {
      GetDataTypeHistoryBody result = apiInstance.v3GetAnalysisDataTypeHistory(analysisId, dataTypeId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3GetAnalysisDataTypeHistory");
      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 Long Analysis ID
dataTypeId Long Data type ID, as returned by the data types list for this analysis. 0 is a valid id.

Return type

GetDataTypeHistoryBody

Authorization

APIKey, bearerAuth

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 -

v3GetFunctionSignature

FunctionSignatureBody v3GetFunctionSignature(analysisId, functionId, includeDataTypes)

Get a function's signature

Returns the extracted signature for one function: its parameters, return type and calling convention. Pass `include_data_types=true` to also get the data types it names. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long functionId = 56L; // Long | Function ID
    Boolean includeDataTypes = true; // Boolean | Include the data types the signature names in the response.
    try {
      FunctionSignatureBody result = apiInstance.v3GetFunctionSignature(analysisId, functionId, includeDataTypes);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3GetFunctionSignature");
      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 Long Analysis ID
functionId Long Function ID
includeDataTypes Boolean Include the data types the signature names in the response. [optional]

Return type

FunctionSignatureBody

Authorization

APIKey, bearerAuth

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 -

v3GetFunctionSignatureHistory

GetFunctionSignatureHistoryBody v3GetFunctionSignatureHistory(analysisId, functionId)

Get a function signature's edit history

The versions a function's signature has held, newest first, each attributed to the edit that wrote it. The first value is the current value. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long functionId = 56L; // Long | Function ID
    try {
      GetFunctionSignatureHistoryBody result = apiInstance.v3GetFunctionSignatureHistory(analysisId, functionId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3GetFunctionSignatureHistory");
      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 Long Analysis ID
functionId Long Function ID

Return type

GetFunctionSignatureHistoryBody

Authorization

APIKey, bearerAuth

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 -

v3ListAnalysisDataTypes

ListAnalysisDataTypesOutputBody v3ListAnalysisDataTypes(analysisId, offset, limit, kind, namespace, search, sourceType, orderBy, order)

List an analysis's data types

Paginated, filterable list of the data types extracted from the binary — structs, unions, enums, typedefs and the rest. Every entry carries its full definition, so paging this list once resolves every `data_type_id` a definition or signature refers to; no follow-up request per id is needed. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long offset = 0L; // Long | Pagination offset.
    Long limit = 100L; // Long | Page size.
    List<String> kind = Arrays.asList(); // List<String> | Only return types of these kinds. Repeat for more than one; empty means no filter.
    List<String> namespace = Arrays.asList(); // List<String> | Only return types in these namespaces, matched exactly. Omit for no filter; pass an empty value (namespace=) for the binary's own types, which have no namespace.
    String search = "search_example"; // String | Only return types whose name contains this term. Wildcards in the term are matched literally.
    List<String> sourceType = Arrays.asList(); // List<String> | Only return types from these sources. Empty means no filter.
    String orderBy = "name"; // String | Field to order by. name orders by namespace, then name, then kind; size orders by size with types of unknown size last, then by namespace, name and kind.
    String order = "ASC"; // String | Sort direction.
    try {
      ListAnalysisDataTypesOutputBody result = apiInstance.v3ListAnalysisDataTypes(analysisId, offset, limit, kind, namespace, search, sourceType, orderBy, order);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3ListAnalysisDataTypes");
      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 Long Analysis ID
offset Long Pagination offset. [optional] [default to 0]
limit Long Page size. [optional] [default to 100]
kind List<String> Only return types of these kinds. Repeat for more than one; empty means no filter. [optional] [enum: STRUCT, UNION, ENUM, TYPEDEF, POINTER, ARRAY, FUNCTION_DEFINITION, BITFIELD, BASE, UNKNOWN]
namespace List<String> Only return types in these namespaces, matched exactly. Omit for no filter; pass an empty value (namespace=) for the binary's own types, which have no namespace. [optional]
search String Only return types whose name contains this term. Wildcards in the term are matched literally. [optional]
sourceType List<String> Only return types from these sources. Empty means no filter. [optional] [enum: SYSTEM, USER, AUTO_UNSTRIP, AI_DECOMP]
orderBy String Field to order by. name orders by namespace, then name, then kind; size orders by size with types of unknown size last, then by namespace, name and kind. [optional] [default to name] [enum: name, size]
order String Sort direction. [optional] [default to ASC] [enum: ASC, DESC]

Return type

ListAnalysisDataTypesOutputBody

Authorization

APIKey, bearerAuth

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 -

v3ListDataTypeFunctions

ListDataTypeFunctionsBody v3ListDataTypeFunctions(analysisId, dataTypeId, pageSize, afterFunctionId)

List the functions using a data type

Functions that use this data type as their return type or as a parameter. Matches the `data_type_id` exactly as it appears in the signature, so a function taking `sockaddr_in *` matches the pointer type rather than `sockaddr_in`. Ordered by function ID. There is no total count; page with `after_function_id`. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long dataTypeId = 56L; // Long | Data type ID, as returned by the data types list for this analysis. 0 is a valid id.
    Long pageSize = 50L; // Long | Page size.
    Long afterFunctionId = 0L; // Long | Return functions with an ID greater than this. Pass the previous page's next_after_function_id; 0 starts at the first function.
    try {
      ListDataTypeFunctionsBody result = apiInstance.v3ListDataTypeFunctions(analysisId, dataTypeId, pageSize, afterFunctionId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3ListDataTypeFunctions");
      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 Long Analysis ID
dataTypeId Long Data type ID, as returned by the data types list for this analysis. 0 is a valid id.
pageSize Long Page size. [optional] [default to 50]
afterFunctionId Long Return functions with an ID greater than this. Pass the previous page's next_after_function_id; 0 starts at the first function. [optional] [default to 0]

Return type

ListDataTypeFunctionsBody

Authorization

APIKey, bearerAuth

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 -

v3ListFunctionSignatures

ListFunctionSignaturesOutputBody v3ListFunctionSignatures(functionIds, includeDataTypes)

Get signatures for many functions

Returns the extracted signature for each supplied function ID, in request order. The functions need not share an analysis; each entry names the analysis its `data_type_id`s resolve against. Pass `include_data_types=true` to also get those data types, grouped by analysis. The caller must have read access to every function or the request is rejected. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    List<Long> functionIds = Arrays.asList(); // List<Long> | Function IDs to fetch signatures for.
    Boolean includeDataTypes = true; // Boolean | Include the data types the signatures name in the response.
    try {
      ListFunctionSignaturesOutputBody result = apiInstance.v3ListFunctionSignatures(functionIds, includeDataTypes);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3ListFunctionSignatures");
      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
functionIds List<Long> Function IDs to fetch signatures for.
includeDataTypes Boolean Include the data types the signatures name in the response. [optional]

Return type

ListFunctionSignaturesOutputBody

Authorization

APIKey, bearerAuth

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 -

v3UpdateAnalysisDataTypes

AnalysisDataTypesOutputBody v3UpdateAnalysisDataTypes(analysisId, updateAnalysisDataTypesInputBody)

Update an analysis's data types

Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `400` `BAD_REQUEST` — Bad Request - `409` `CONFLICT` — Conflict - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    UpdateAnalysisDataTypesInputBody updateAnalysisDataTypesInputBody = new UpdateAnalysisDataTypesInputBody(); // UpdateAnalysisDataTypesInputBody | 
    try {
      AnalysisDataTypesOutputBody result = apiInstance.v3UpdateAnalysisDataTypes(analysisId, updateAnalysisDataTypesInputBody);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3UpdateAnalysisDataTypes");
      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 Long Analysis ID
updateAnalysisDataTypesInputBody UpdateAnalysisDataTypesInputBody

Return type

AnalysisDataTypesOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

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

v3UpdateFunctionSignature

FunctionSignatureEntry v3UpdateFunctionSignature(analysisId, functionId, updateFunctionSignatureInputBody)

Update a function's signature

Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Error codes: - `403` `ACCESS_DENIED` — Access Denied - `404` `NOT_FOUND` — Not Found - `400` `BAD_REQUEST` — Bad Request - `422` `VALIDATION_FAILED` — Validation Failed

Example

// 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.DataTypesApi;

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");

    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    DataTypesApi apiInstance = new DataTypesApi(defaultClient);
    Long analysisId = 56L; // Long | Analysis ID
    Long functionId = 56L; // Long | Function ID
    UpdateFunctionSignatureInputBody updateFunctionSignatureInputBody = new UpdateFunctionSignatureInputBody(); // UpdateFunctionSignatureInputBody | 
    try {
      FunctionSignatureEntry result = apiInstance.v3UpdateFunctionSignature(analysisId, functionId, updateFunctionSignatureInputBody);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DataTypesApi#v3UpdateFunctionSignature");
      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 Long Analysis ID
functionId Long Function ID
updateFunctionSignatureInputBody UpdateFunctionSignatureInputBody

Return type

FunctionSignatureEntry

Authorization

APIKey, bearerAuth

HTTP request headers

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

HTTP response details

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