Skip to content

Latest commit

 

History

History
370 lines (265 loc) · 11.4 KB

RelationshipsApi.md

File metadata and controls

370 lines (265 loc) · 11.4 KB

RelationshipsApi

Method HTTP request Description
clearSuspectLink DELETE /relationships/{relationshipId}/suspect Remove an existing suspect link for the relationship with the specified ID
createRelationship POST /relationships Create a new relationship
deleteRelationship DELETE /relationships/{relationshipId} Delete the relationship with the specified ID
getRelationship GET /relationships/{relationshipId} Get the relationship with the specified ID
getRelationships GET /relationships Get all relationships in the project with the specified ID
updateRelationship PUT /relationships/{relationshipId} Update the relationship with the specified ID

clearSuspectLink

AbstractRestResponse clearSuspectLink(relationshipId)

Remove an existing suspect link for the relationship with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.RelationshipsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

RelationshipsApi apiInstance = new RelationshipsApi();
Integer relationshipId = 56; // Integer | 
try {
    AbstractRestResponse result = apiInstance.clearSuspectLink(relationshipId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RelationshipsApi#clearSuspectLink");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
relationshipId Integer

Return type

AbstractRestResponse

Authorization

basic, oauth2

HTTP request headers

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

createRelationship

CreatedResponse createRelationship(body)

Create a new relationship

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.RelationshipsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

RelationshipsApi apiInstance = new RelationshipsApi();
RequestRelationship body = new RequestRelationship(); // RequestRelationship | 
try {
    CreatedResponse result = apiInstance.createRelationship(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RelationshipsApi#createRelationship");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RequestRelationship

Return type

CreatedResponse

Authorization

basic, oauth2

HTTP request headers

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

deleteRelationship

AbstractRestResponse deleteRelationship(relationshipId)

Delete the relationship with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.RelationshipsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

RelationshipsApi apiInstance = new RelationshipsApi();
Integer relationshipId = 56; // Integer | 
try {
    AbstractRestResponse result = apiInstance.deleteRelationship(relationshipId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RelationshipsApi#deleteRelationship");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
relationshipId Integer

Return type

AbstractRestResponse

Authorization

basic, oauth2

HTTP request headers

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

getRelationship

RelationshipDataWrapper getRelationship(relationshipId, include)

Get the relationship with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.RelationshipsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

RelationshipsApi apiInstance = new RelationshipsApi();
Integer relationshipId = 56; // Integer | 
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
    RelationshipDataWrapper result = apiInstance.getRelationship(relationshipId, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RelationshipsApi#getRelationship");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
relationshipId Integer
include List<String> Links to include as full objects in the linked map [optional]

Return type

RelationshipDataWrapper

Authorization

basic, oauth2

HTTP request headers

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

getRelationships

RelationshipDataListWrapper getRelationships(project, startAt, maxResults, include)

Get all relationships in the project with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.RelationshipsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

RelationshipsApi apiInstance = new RelationshipsApi();
Integer project = 56; // Integer | 
Integer startAt = 56; // Integer | 
Integer maxResults = 56; // Integer | If not set, this defaults to 20. This cannot be larger than 50
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
    RelationshipDataListWrapper result = apiInstance.getRelationships(project, startAt, maxResults, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RelationshipsApi#getRelationships");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
project Integer
startAt Integer [optional]
maxResults Integer If not set, this defaults to 20. This cannot be larger than 50 [optional]
include List<String> Links to include as full objects in the linked map [optional]

Return type

RelationshipDataListWrapper

Authorization

basic, oauth2

HTTP request headers

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

updateRelationship

AbstractRestResponse updateRelationship(body, relationshipId)

Update the relationship with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.RelationshipsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

RelationshipsApi apiInstance = new RelationshipsApi();
RequestRelationship body = new RequestRelationship(); // RequestRelationship | 
Integer relationshipId = 56; // Integer | 
try {
    AbstractRestResponse result = apiInstance.updateRelationship(body, relationshipId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RelationshipsApi#updateRelationship");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RequestRelationship
relationshipId Integer

Return type

AbstractRestResponse

Authorization

basic, oauth2

HTTP request headers

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