Skip to content

Latest commit

 

History

History
153 lines (117 loc) · 4.75 KB

File metadata and controls

153 lines (117 loc) · 4.75 KB

FirmwareApi

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

Method HTTP request Description
getBinariesForFirmwareTask GET /v2/firmware/get-binaries/{task_id} Upload firmware for unpacking
uploadFirmware POST /v2/firmware Upload firmware for unpacking

getBinariesForFirmwareTask

Object getBinariesForFirmwareTask(taskId)

Upload firmware for unpacking

Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response.

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.FirmwareApi;

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

    FirmwareApi apiInstance = new FirmwareApi(defaultClient);
    String taskId = "taskId_example"; // String | 
    try {
      Object result = apiInstance.getBinariesForFirmwareTask(taskId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling FirmwareApi#getBinariesForFirmwareTask");
      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
taskId String

Return type

Object

Authorization

APIKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Invalid request parameters -

uploadFirmware

Object uploadFirmware(_file, password)

Upload firmware for unpacking

Uploads a firmware file and begins a 'Firmware Unpacker' task. Returns a result identifier, which can be used to poll for the response.

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.FirmwareApi;

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

    FirmwareApi apiInstance = new FirmwareApi(defaultClient);
    String _file = "_file_example"; // String | 
    String password = "password_example"; // String | 
    try {
      Object result = apiInstance.uploadFirmware(_file, password);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling FirmwareApi#uploadFirmware");
      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
_file String
password String [optional]

Return type

Object

Authorization

APIKey

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful Response -
422 Unprocessable Entity -
500 Internal Server Error -