AttachmentInfo (SOAP API)
IMPORTANT The SOAP API entered a limited enhancement phase in Q4 2020. Access to version 1.6 will be deactivated.
The AttachmentInfo entity describes an Attachment in Autotask. Refer to the Overview section of this article to learn more about working with attachments in the Autotask SOAP API. For the REST API version of this entity, review AttachmentInfo (REST API)
IMPORTANT Attachment behavior in the API has changed. To avoid service disruption, review our Changes to Attachment entities article for important information about this recent update.
BEFORE YOU BEGIN This entity is unique. It does not use the standard create(), update() and delete() API calls. Instead, you must use one of the following three calls: GetAttachment(), CreateAttachment(), and DeleteAttachment(). Refer to Attachment API calls.
Entity details
You can also retrieve this information with the Web Services API call The getEntityInfo() SOAP API call.
Entity Name: | AttachmentInfo |
Can Create: | |
Can Update: | |
Can Query: | |
Can Delete: | |
Can Have UDFs: |
Overview
When adding an attachment to an entity via the API, the attachment must be encoded as base64 binary data.
To ensure a consistent quality of service for all users, the API uses the following thresholds when processing attachments.
- The maximum attachment file size indicated in the Autotask Online Help does not apply to the API. The API size limit for individual attachment files is 6 to 7 MB, with a maximum of 10,000,000 bytes within a five-minute period. If your integration exceeds either of these limits, you'll receive an error message indicating condition. If the integration exceeds 10,000,000 bytes within a five-minute span, the API will also stop accepting attachment creation calls for five minutes.
NOTE The API size limit for individual attachments is less than the 10 MB limit for individual attachment files when working through the Autotask UI.
- Attachment types are limited to the file types allowed in Autotask. For more details, refer to Add attachments.
Attachments are external documents that are associated with one of the following entities. Attachments in Autotask can be documents uploaded to the server, file links, folder links, and URLs.
- Account
- Documents (REST only)
- Expenses
- Knowledgebase articles (REST only)
- Task
- Ticket
- Task or Ticket Note
- Time Entry
- Asset
- Asset Note
- Project
- Opportunity
The following parent entities support nested attachments. Nested attachments are a child attachment to a parent attachment, and both the parent and the child can be of the same entity type.
- Articles
- Companies
- Configuration Items
- Documents
- Opportunities
- Tasks
- Tickets
NOTE Attachments nested under note or time entry attachments are created via the parent entity URL using the parentAttachmentId. The nested attachment does not have visibility to the note or time entry, but it will reflect that the parent is an attachment with the supplied ID.
The following parent entities do not support nested attachments. For these parents, you cannot create attachments that have a parent attachment of the same type.
- Account
- Sales Order
- Expense Report
- Resource
- Account Note
- Contract Note
- Project
- Project Note
Attachments support create, delete, and query functions only. It is not possible to update an attachment.
When you query an attachment entity's fields, you'll see picklist results similar to the example below. The REST API uses the value and label fields to define what type of content is attached to the entity. The label field matches the content classifications shown within Autotask. For more information about attachment types, refer to Add attachments.
"picklistValues": [
{
"value": "FILE_LINK",
"label": "File Link",
"isDefaultValue": false,
"sortOrder": 1,
"parentValue": "",
"isActive": true,
"isSystem": true
},
{
"value": "FOLDER_LINK",
"label": "Folder Link",
"isDefaultValue": false,
"sortOrder": 2,
"parentValue": "",
"isActive": true,
"isSystem": true
},
{
"value": "URL",
"label": "URL",
"isDefaultValue": false,
"sortOrder": 3,
"parentValue": "",
"isActive": true,
"isSystem": true
},
{
"value": "FILE_ATTACHMENT",
"label": "Attachment",
"isDefaultValue": false,
"sortOrder": 4,
"parentValue": "",
"isActive": true,
"isSystem": true
}
],
Fields that cannot be queried
The following fields from this entity will return an error when queried.
- FileSize
Conditions and requirements
General
-
Queries that specify IDs of entities with child data will return attachments associated with those children. For example, a query that specifies a TicketID value will return all attachments that are parented to that ticket, plus any attachments that are parented to child TicketNotes, TimeEntries, and Attachments.
When adding an attachment to an entity's Data field, the attachment must be encoded as base64 binary data.
- The API size limit for individual attachment files is 6 to 7 MB, with a maximum of 10,000,000 bytes within a five-minute period. If your integration exceeds these limits, an error is generated. Note that, if the integration exceeds the allowed volume per 5 minutes, API CreateAttachment() will stop accepting calls for 5 minutes.
NOTE The API attachment file size limit is less than the 10 MB limit for individual attachment files when working through the Autotask UI.
- File types are limited to the file types allowed in Autotask. For more information, see Add attachments in the Online Help. The maximum file size indicated in the Help does not apply to the API.
- To add, download, and delete attachments with the API, you must use the three attachment specific API calls: GetAttachment(), CreateAttachment(), and DeleteAttachment().
- All AttachmentInfo entity types except for Opportunity type must specify a TypeID and ParentID
Opportunity type attachments must specify a either a Type ID and ParentID, or TypeID and OpportunityID, or TypeID and both ParentID and OpportunityID.
OpportunityID value must be provided in order to query by OpportunityID.
- To specify the associated entity, use Parent Type. Use the The getFieldInfo() SOAP API call API call to determine ParentType picklist values.
- To specify the type of attachment, use the Type field. Use the The getFieldInfo() SOAP API call API call to determine Type picklist values.
- If your query supplies both an entityID and a parentID, the entityID will take precedence.
Contact impersonation validation rules for creating entities
- The API user security level has access to contact impersonation for attachments.
- Publish must always be ALL.
- Contacts can only create attachments for Tickets or Project/Task/Ticket Notes that they have created.
- The contact is active.
- The contact's account is active.
Special field attributes
Field | Conditions and Requirements |
---|---|
ContentType |
When you query an attachment entity's fields, you'll see the ContentType listed as FILE_LINK, FOLDER_LINK, URL, or FILE_ATTACHMENT. These values correspond to the content classifications shown within Autotask. For more information about attachment types, refer to Add attachments. |
Publish | To specify whether the attachment should be available to all Autotask users, including Client Portal users, or internal users only, use the Publish field. Use the The getFieldInfo() SOAP API call API call to determine Publish picklist values. |
Field definitions
The following table describes the standard Autotask field objects for this entity.
- To retrieve more detailed information specific to a particular Autotask implementation, use the Web Services API call The getFieldInfo() SOAP API call.
- For information on entity UDFs, use getUDFInfo().
- For String datatypes, the number in parentheses ( ) indicates the maximum number of characters allowed.
- LT indicates Local Term.
For more information about fields marked as picklists, review our Understanding picklists article.
Field Name | Label | Datatype | Read Only | Is Required | Reference Name | Picklist |
---|---|---|---|---|---|---|
AccountID |
Account ID |
integer |
|
|
Account |
|
AccountNoteID |
Account Note ID |
integer |
|
|
AccountNote |
|
AttachDate | Attach Date | datetime | ||||
AttachedByContactID | Attached By Contact | long | Contact | |||
AttachedByResourceID | Attached By Resource | long | Resource | |||
ContentType | Content Type | string (100) |
||||
ContractID |
Contract ID |
integer |
|
|
Contract |
|
ContractNoteID |
Contract Note ID |
integer |
|
|
ContractNote |
|
CreatorType |
CreatorType |
integer |
|
|
|
|
ExpenseReportID |
Expense Report ID |
integer |
|
|
ExpenseReport |
|
FileSize | File Size | long | ||||
FullPath | File Name | string (255) | ||||
id | Attachment ID | long | ||||
ImpersonatorCreatorResourceID | Impersonator Creator Resource ID | integer | Resource |
|
||
InstalledProductID |
Asset ID |
integer |
|
|
InstalledProduct |
|
InstalledProductNoteID |
Asset Note ID |
integer |
|
|
InstalledProductNote |
|
OpportunityID | Opportunity ID | long | Opportunity | |||
ParentAttachmentID |
Parent Attachment ID |
integer |
|
|
Multiple; varies based on parent. |
|
ParentID | Parent ID | long | ||||
ParentType | Parent Type | integer | ||||
ProjectID |
Project ID |
integer |
|
|
Project |
|
ProjectNoteID |
Project Note ID |
integer |
|
|
ProjectNote |
|
Publish | Publish | integer | ||||
ResourceID |
Resource ID |
integer |
|
|
Resource |
|
SalesOrderID |
Sales Order ID |
integer |
|
|
SalesOrder |
|
TaskID |
Task ID |
integer |
|
|
Task |
|
TaskNoteID |
Task Note ID |
integer |
|
|
TaskNote |
|
TicketID |
Ticket ID |
integer |
|
|
Ticket |
|
TicketNoteID |
Ticket Note ID |
integer |
|
|
TicketNote |
|
TimeEntryID |
Time Entry ID |
integer |
|
|
TimeEntry |
|
Title | Title | string (255) | ||||
Type | Type | string (30) |