KelvinTegelaar / AutotaskAPI

Autotask 2020.2 REST API PowerShell wrapper
https://cyberdrain.com
MIT License
67 stars 25 forks source link

Attachment behavior in the API has changed - 2021.1 #29

Closed s0nders closed 7 months ago

s0nders commented 3 years ago

Update entities and query's to support the changes to Attachment entities

Previously, queries to Autotask PSA attachment endpoints could return any attachments associated with any object and could be very inefficient across entity types.

To address this issue, we have added object ID fields to all attachment entities. Now, calls to an attachment endpoint will require the inclusion of the object you wish to query. For example, a request to the TicketAttachments entity will require a value for the ticketID field.

This improvement will enhance API performance and the granularity of the information returned to your integrations. For more information, refer to the next sections of this article

s0nders commented 3 years ago

Looks like the entityInformation endpoint just needs to be removed from the v1.json since its the 1st one getting called in the module for get/set-autotaskapiresource

Original : GET https://webservices3.autotask.net/ATServicesRest//V1.0/TicketAttachments/entityInformation//query?search={"filter":[{"value":"700255","field":"ticketID","op":"eq"}]}

After Change : GET https://webservices3.autotask.net/ATServicesRest//V1.0/TicketAttachments//query?search={"filter":[{"value":"700255","field":"ticketID","op":"eq"}]}