[ARCHIVED] Arc Media List through API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In the ARC media library API documentation , there is no API to fetch the list of media in a collection. What is the way to get all media items in a collection through API?
Regards,
Shriram
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sounds like a pagination issue. If you scroll to the bottom of the page, it mentions the per_page parameter. There is also a page parameter.
per_page: The number of results per page. Default: 20, Max: 50
page: The page to retrieve. Default: 1
When you get the first perspective result, there is some meta data that lets you know the total. In the example below, I made the default call, so I got 20 perspectives.
The last page is 5, so I could make the following calls to get all of the data (my collection ID was 342). The first one was the original call.
/api/media_management/collections/342/perspectives
/api/media_management/collections/342/perspectives?page=2
/api/media_management/collections/342/perspectives?page=3
/api/media_management/collections/342/perspectives?page=4
/api/media_management/collections/342/perspectives?page=5
Alternatively, if I specified per_page=50, then I get this result
In this case, I could get all of the information in just two calls.
/api/media_management/collections/342/perspectives?per_page=50
/api/media_management/collections/342/perspectives?per_page=50&page=2
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.