Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Way To Get Multiple Media Objects on Content #481

Open
volomike opened this issue Nov 17, 2020 · 2 comments
Open

Need Way To Get Multiple Media Objects on Content #481

volomike opened this issue Nov 17, 2020 · 2 comments

Comments

@volomike
Copy link

I wanted to list out images from the CMS without knowing their names head of time. I needed to collect them together somehow, and then use an API to list out that collection.

I attempted:

Attempt 1: I created an entry like a folder and then put one single default content in there with an attached media object. I was unable to use /api/files, /api/folders, /api/entries, or /api/images to get the list of images for a given piece of content.

Attempt 2: I created a single entry and then, off itself, I created multiple media objects. Again, I was unable to use the API to get a wildcard of the images.

@volomike
Copy link
Author

Reading the source code, I found the solution, and think that you have an error in the docs under Fetch Files Collection.

GET /api/files?path=entries/gallery&token={YOUR_FILES_TOKEN}

I believe that it's not id that it wants as a parameter, but path.

@Awilum
Copy link
Member

Awilum commented Nov 17, 2020

yes, seems it is a mistake in the documentation. path should be instead of id
https://docs.flextype.org/en/rest-api/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants