-
Notifications
You must be signed in to change notification settings - Fork 1
ComponentsApi
All URIs are relative to https://demo.iriusrisk.com/api/v1
Method | HTTP request | Description |
---|---|---|
productsRefComponentsComponentRefTestsCwePut | PUT /products/{ref}/components/{componentRef}/tests/{cwe} | Updates a single test to a component. |
productsRefComponentsComponentRefTestsTestTypeUploadPost | POST /products/{ref}/components/{componentRef}/tests/{testType}/upload | Imports test results from different sources to a component |
List<InlineResponse2001> productsRefComponentsComponentRefTestsCwePut(apiToken, ref, componentRef, cwe, updateStatusTestRequestBody)
Updates a single test to a component.
Updates a single test to a component. Conditions to be able to perform the action: - To have the permission TEST_UPDATE granted.
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.ComponentsApi;
ComponentsApi apiInstance = new ComponentsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String ref = "ref_example"; // String | ID for product
String componentRef = "componentRef_example"; // String | ID for component
String cwe = "cwe_example"; // String | countermeasure or weakness CWE
UpdateStatusTestRequestBody updateStatusTestRequestBody = new UpdateStatusTestRequestBody(); // UpdateStatusTestRequestBody | JSON data that contains the information to update test
try {
List<InlineResponse2001> result = apiInstance.productsRefComponentsComponentRefTestsCwePut(apiToken, ref, componentRef, cwe, updateStatusTestRequestBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ComponentsApi#productsRefComponentsComponentRefTestsCwePut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | Authentication token | |
ref | String | ID for product | |
componentRef | String | ID for component | |
cwe | String | countermeasure or weakness CWE | |
updateStatusTestRequestBody | UpdateStatusTestRequestBody | JSON data that contains the information to update test |
No authorization required
- Content-Type: application/json
- Accept: application/json
InlineResponse2011 productsRefComponentsComponentRefTestsTestTypeUploadPost(apiToken, ref, componentRef, testType, fileName)
Imports test results from different sources to a component
Imports test results from different sources (OWASP ZAP, Cucumber, Micro Focus Fortify) into the specified component. More than one file can be attached to the call. Conditions to be able to perform the action: - To have the permission TEST_UPDATE granted.
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.ComponentsApi;
ComponentsApi apiInstance = new ComponentsApi();
String apiToken = "apiToken_example"; // String | Authentication token
String ref = "ref_example"; // String | ID for product
String componentRef = "componentRef_example"; // String | ID for component
String testType = "testType_example"; // String | Type of test to be imported (zap|cucumber|junit|hp-fortify)
File fileName = new File("/path/to/file.txt"); // File | File to upload
try {
InlineResponse2011 result = apiInstance.productsRefComponentsComponentRefTestsTestTypeUploadPost(apiToken, ref, componentRef, testType, fileName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ComponentsApi#productsRefComponentsComponentRefTestsTestTypeUploadPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | Authentication token | |
ref | String | ID for product | |
componentRef | String | ID for component | |
testType | String | Type of test to be imported (zap | cucumber |
fileName | File | File to upload | [optional] |
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json