Skip to content

Latest commit

 

History

History
344 lines (256 loc) · 11.7 KB

AttributeDefinitionControllerApi.md

File metadata and controls

344 lines (256 loc) · 11.7 KB

AttributeDefinitionControllerApi

All URIs are relative to https://SSC:8080/ssc/api/v1

Method HTTP request Description
createAttributeDefinition POST /attributeDefinitions create
deleteAttributeDefinition DELETE /attributeDefinitions/{id} delete
listAttributeDefinition GET /attributeDefinitions list
multiDeleteAttributeDefinition DELETE /attributeDefinitions multiDelete
readAttributeDefinition GET /attributeDefinitions/{id} read
updateAttributeDefinition PUT /attributeDefinitions/{id} update

createAttributeDefinition

ApiResultAttributeDefinition createAttributeDefinition(resource)

create

Example

// Import classes:
//import com.fortify.ssc.restclient.ApiClient;
//import com.fortify.ssc.restclient.ApiException;
//import com.fortify.ssc.restclient.Configuration;
//import com.fortify.ssc.restclient.auth.*;
//import com.fortify.ssc.restclient.api.AttributeDefinitionControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

AttributeDefinitionControllerApi apiInstance = new AttributeDefinitionControllerApi();
AttributeDefinition resource = new AttributeDefinition(); // AttributeDefinition | resource
try {
    ApiResultAttributeDefinition result = apiInstance.createAttributeDefinition(resource);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AttributeDefinitionControllerApi#createAttributeDefinition");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
resource AttributeDefinition resource

Return type

ApiResultAttributeDefinition

Authorization

FortifyToken

HTTP request headers

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

deleteAttributeDefinition

ApiResultVoid deleteAttributeDefinition(id)

delete

Example

// Import classes:
//import com.fortify.ssc.restclient.ApiClient;
//import com.fortify.ssc.restclient.ApiException;
//import com.fortify.ssc.restclient.Configuration;
//import com.fortify.ssc.restclient.auth.*;
//import com.fortify.ssc.restclient.api.AttributeDefinitionControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

AttributeDefinitionControllerApi apiInstance = new AttributeDefinitionControllerApi();
Long id = 789L; // Long | id
try {
    ApiResultVoid result = apiInstance.deleteAttributeDefinition(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AttributeDefinitionControllerApi#deleteAttributeDefinition");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Long id

Return type

ApiResultVoid

Authorization

FortifyToken

HTTP request headers

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

listAttributeDefinition

ApiResultListAttributeDefinition listAttributeDefinition(fields, start, limit, q, orderby)

list

Example

// Import classes:
//import com.fortify.ssc.restclient.ApiClient;
//import com.fortify.ssc.restclient.ApiException;
//import com.fortify.ssc.restclient.Configuration;
//import com.fortify.ssc.restclient.auth.*;
//import com.fortify.ssc.restclient.api.AttributeDefinitionControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

AttributeDefinitionControllerApi apiInstance = new AttributeDefinitionControllerApi();
String fields = "fields_example"; // String | Output fields
Integer start = 0; // Integer | A start offset in object listing
Integer limit = 200; // Integer | A maximum number of returned objects in listing, if '-1' or '0' no limit is applied
String q = "q_example"; // String | A search query
String orderby = "orderby_example"; // String | Fields to order by
try {
    ApiResultListAttributeDefinition result = apiInstance.listAttributeDefinition(fields, start, limit, q, orderby);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AttributeDefinitionControllerApi#listAttributeDefinition");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fields String Output fields [optional]
start Integer A start offset in object listing [optional] [default to 0]
limit Integer A maximum number of returned objects in listing, if '-1' or '0' no limit is applied [optional] [default to 200]
q String A search query [optional]
orderby String Fields to order by [optional]

Return type

ApiResultListAttributeDefinition

Authorization

FortifyToken

HTTP request headers

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

multiDeleteAttributeDefinition

ApiResultVoid multiDeleteAttributeDefinition(ids)

multiDelete

Example

// Import classes:
//import com.fortify.ssc.restclient.ApiClient;
//import com.fortify.ssc.restclient.ApiException;
//import com.fortify.ssc.restclient.Configuration;
//import com.fortify.ssc.restclient.auth.*;
//import com.fortify.ssc.restclient.api.AttributeDefinitionControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

AttributeDefinitionControllerApi apiInstance = new AttributeDefinitionControllerApi();
String ids = "ids_example"; // String | A comma-separated list of resource identifiers
try {
    ApiResultVoid result = apiInstance.multiDeleteAttributeDefinition(ids);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AttributeDefinitionControllerApi#multiDeleteAttributeDefinition");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
ids String A comma-separated list of resource identifiers

Return type

ApiResultVoid

Authorization

FortifyToken

HTTP request headers

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

readAttributeDefinition

ApiResultAttributeDefinition readAttributeDefinition(id, fields)

read

Example

// Import classes:
//import com.fortify.ssc.restclient.ApiClient;
//import com.fortify.ssc.restclient.ApiException;
//import com.fortify.ssc.restclient.Configuration;
//import com.fortify.ssc.restclient.auth.*;
//import com.fortify.ssc.restclient.api.AttributeDefinitionControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

AttributeDefinitionControllerApi apiInstance = new AttributeDefinitionControllerApi();
Long id = 789L; // Long | id
String fields = "fields_example"; // String | Output fields
try {
    ApiResultAttributeDefinition result = apiInstance.readAttributeDefinition(id, fields);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AttributeDefinitionControllerApi#readAttributeDefinition");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Long id
fields String Output fields [optional]

Return type

ApiResultAttributeDefinition

Authorization

FortifyToken

HTTP request headers

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

updateAttributeDefinition

ApiResultAttributeDefinition updateAttributeDefinition(id, resource)

update

Example

// Import classes:
//import com.fortify.ssc.restclient.ApiClient;
//import com.fortify.ssc.restclient.ApiException;
//import com.fortify.ssc.restclient.Configuration;
//import com.fortify.ssc.restclient.auth.*;
//import com.fortify.ssc.restclient.api.AttributeDefinitionControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

AttributeDefinitionControllerApi apiInstance = new AttributeDefinitionControllerApi();
Long id = 789L; // Long | id
AttributeDefinition resource = new AttributeDefinition(); // AttributeDefinition | resource
try {
    ApiResultAttributeDefinition result = apiInstance.updateAttributeDefinition(id, resource);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AttributeDefinitionControllerApi#updateAttributeDefinition");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Long id
resource AttributeDefinition resource

Return type

ApiResultAttributeDefinition

Authorization

FortifyToken

HTTP request headers

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