Skip to main content
New Idea

Add trashed status to assets

Related products:Freshservice
  • June 23, 2025
  • 0 replies
  • 13 views

Medic1334
Top Contributor ⭐
Forum|alt.badge.img+9

I have a script that does the below:

  • Get list of services from assets
  • For each asset, get the relationships that the asset has
  • On each device that has a relationship to that service, update the value of selected fields from the service into the asset

Unfortunately this script is hitting errors because some devices have been moved to the trash as they are no longer used.  In looking at the API reference documentation (and in talking to support), there is no field when querying a specific asset to see that the asset is actually in the trash.  There in an ability to search/get a list of items in the trash, but we are currently at 1800 items (and likely to grow) in there and growing so trying not to burn an additional 18+ API credits to build an array on every run where I could, if the field existed, simply use an if clause to skip the asset if the trashed field was true (For example).