Solved

API v2 - "List all Asset Types" only lists predefined asset types

  • 15 July 2021
  • 3 replies
  • 124 views

  • Anonymous
  • 0 replies

We want to go with our own defined asset types as we find the OOTB asset type properties to overloaded, therefore we disabled them and created our own types. We want now to write an automation script to create the assets itself via the API.

We noticed now using the “List all Asset Types” API request, we are getting only the first 30 asset types as result. 

 

icon

Best answer by Anonymous 15 July 2021, 17:05

View original

3 replies

Never mind. I found the answer:

 

But still. Shouldn’t the default request deliver the complete asset type list?

Userlevel 4
Badge +6

Hi,
 

Greetings!

We only list the first 30 results in the API response per page. You can include pagination in your API call to list a maximum of 100 entries per page. 

https://domain.freshservice.com/api/v2/asset_types?per_page=100

For your reference: https://api.freshservice.com/#pagination. We hope this helps.

Warm Regards,
Sanofar
Team Freshservice

Reply