Method | HTTP request | Description |
---|---|---|
downloadFile | GET /attachments/{attachmentId}/file | Download attachment file from the attachment with the specified ID |
getAttachmentItem | GET /attachments/{attachmentId} | Get the attachment with the specified ID |
getItemComments | GET /attachments/{attachmentId}/comments | Get all comments for the item with the specified ID |
getLock | GET /attachments/{attachmentId}/lock | Get the locked state, last locked date, and last locked by user for the item with the specified ID |
getVersionOnItem1 | GET /attachments/{attachmentId}/versions/{versionNum} | Get the numbered version for the item with the specified ID |
getVersionedItem1 | GET /attachments/{attachmentId}/versions/{versionNum}/versioneditem | Get the snapshot of the attachment at the specified version |
getVersionsOnItem1 | GET /attachments/{attachmentId}/versions | Get all versions for the item with the specified ID |
updateLock | PUT /attachments/{attachmentId}/lock | Update the locked state of the item with the specified ID |
uploadFile | PUT /attachments/{attachmentId}/file | Upload attachment file to the attachment with the specified ID |
downloadFile(attachmentId)
Download attachment file from the attachment with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer attachmentId = 56; // Integer |
try {
apiInstance.downloadFile(attachmentId);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#downloadFile");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attachmentId | Integer |
null (empty response body)
- Content-Type: application/json
- Accept: application/octet-stream
AttachmentDataWrapper getAttachmentItem(attachmentId, include)
Get the attachment with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer attachmentId = 56; // Integer |
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
AttachmentDataWrapper result = apiInstance.getAttachmentItem(attachmentId, include);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getAttachmentItem");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attachmentId | Integer | ||
include | List<String> | Links to include as full objects in the linked map | [optional] |
- Content-Type: application/json
- Accept: application/json
CommentDataListWrapper getItemComments(attachmentId, startAt, maxResults, rootCommentsOnly, include)
Get all comments for the item with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer attachmentId = 56; // Integer |
Integer startAt = 56; // Integer |
Integer maxResults = 56; // Integer | If not set, this defaults to 20. This cannot be larger than 50
Boolean rootCommentsOnly = false; // Boolean |
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
CommentDataListWrapper result = apiInstance.getItemComments(attachmentId, startAt, maxResults, rootCommentsOnly, include);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getItemComments");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attachmentId | Integer | ||
startAt | Integer | [optional] | |
maxResults | Integer | If not set, this defaults to 20. This cannot be larger than 50 | [optional] |
rootCommentsOnly | Boolean | [optional] [default to false] | |
include | List<String> | Links to include as full objects in the linked map | [optional] |
- Content-Type: application/json
- Accept: application/json
LockDataWrapper getLock(attachmentId, include)
Get the locked state, last locked date, and last locked by user for the item with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer attachmentId = 56; // Integer |
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
LockDataWrapper result = apiInstance.getLock(attachmentId, include);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getLock");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attachmentId | Integer | ||
include | List<String> | Links to include as full objects in the linked map | [optional] |
- Content-Type: application/json
- Accept: application/json
VersionDataWrapper getVersionOnItem1(versionNum, attachmentId, include)
Get the numbered version for the item with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer versionNum = 56; // Integer |
Integer attachmentId = 56; // Integer |
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
VersionDataWrapper result = apiInstance.getVersionOnItem1(versionNum, attachmentId, include);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getVersionOnItem1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
versionNum | Integer | ||
attachmentId | Integer | ||
include | List<String> | Links to include as full objects in the linked map | [optional] |
- Content-Type: application/json
- Accept: application/json
VersionedAttachmentDataWrapper getVersionedItem1(versionNum, attachmentId, include)
Get the snapshot of the attachment at the specified version
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer versionNum = 56; // Integer |
Integer attachmentId = 56; // Integer |
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
VersionedAttachmentDataWrapper result = apiInstance.getVersionedItem1(versionNum, attachmentId, include);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getVersionedItem1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
versionNum | Integer | ||
attachmentId | Integer | ||
include | List<String> | Links to include as full objects in the linked map | [optional] |
VersionedAttachmentDataWrapper
- Content-Type: application/json
- Accept: application/json
VersionDataListWrapper getVersionsOnItem1(attachmentId, startAt, maxResults, include)
Get all versions for the item with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer attachmentId = 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 {
VersionDataListWrapper result = apiInstance.getVersionsOnItem1(attachmentId, startAt, maxResults, include);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getVersionsOnItem1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attachmentId | 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] |
- Content-Type: application/json
- Accept: application/json
AbstractRestResponse updateLock(body, attachmentId)
Update the locked state of the item with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
RequestLock body = new RequestLock(); // RequestLock |
Integer attachmentId = 56; // Integer |
try {
AbstractRestResponse result = apiInstance.updateLock(body, attachmentId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#updateLock");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | RequestLock | ||
attachmentId | Integer |
- Content-Type: application/json
- Accept: application/json
AbstractRestResponse uploadFile(attachmentId, body)
Upload attachment file to the attachment with the specified ID
// 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.AttachmentsApi;
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");
AttachmentsApi apiInstance = new AttachmentsApi();
Integer attachmentId = 56; // Integer |
FormDataMultiPart body = new FormDataMultiPart(); // FormDataMultiPart |
try {
AbstractRestResponse result = apiInstance.uploadFile(attachmentId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#uploadFile");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attachmentId | Integer | ||
body | FormDataMultiPart | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json