Hello Unity Team (Unity Cloud Asset Manager Team/ RestAPI),
I am currently working with the Unity Asset Manager API and have encountered a challenge regarding the ability to retrieve a list of assets based on specific parameters. Specifically, I would like to request the ability to:
- Retrieve a list of assetsID or asset objects by collection name.
- Retrieve a list of assetsID or asset objects by project ID
However, there is no direct way to I found to retrive a list of assets by specifying either the collection name or project ID combined with the collection ID. This limitation makes it challenging to display the list of assets belonging to a particular collection in the user interface, which is a critical part of asset management and project organization.
If such an endpoint exists, could you please provide further details on how to use it? If it doesn’t currently exist, I would appreciate any suggestions for alternative methods to retrieve the required information.
Thank you for your time and assistance. I look forward to your response.
Best regards,
Dhruv Modh
Hi Dhruv,
I hope you are doing well.
In order to perform the operations you are requesting I would suggest to use the Search Assets endpoint.
By default, without any filter applied, you can obtain all the assets inside a specific project (the project ID can be defined defined in the URL of the request). If you want to obtain only assets in a specific collections you can use the collections array inside the filter objects. Please be aware that by default searching in a collection will not search in all sub-collections so you need to provide also the list of sub-collections if so you wish (the list of collections in a project can be found using the List collections endpoint).
Also, please be aware that the results are paginated using a token. On the first request you do no need any token inside the pagination field, subsequent calls you will need to provide the next pagination which is returned in the next field of the response. If the returned next is empty then it means that Asset Manager has returned all the assets matching your criteria.
Please do not hesitate to contact us if you need any further clarification.
Best regards,
Stefano
Thanks @Stefano_Asset_Manager
Solution Worked !
Glad it worked.
If you have any other query please do not hesitate to let us know.
All the best,
Stefano
1 Like