Closed ejemba closed 5 years ago
Hi @ejemba -
I'm glad you are enjoying Ponzu! I saw your other issue, and will reply asap, but I am travelling and don't have enough time to give it a thoughtful enough response yet.
To try and quickly address this issue: Fetching the list of types can be done by adding a route to call a handler, which I intentionally unimplemented a long time ago for security reasons. In any of your content types, you can add handlers to the default http serve mux, used by Ponzu globally. I'd try to offer more code to demonstrate the implementation, but I'm short on time. See the handler func below, as it should give you a good starting point:
Feel free to update this issue with additional comments if you have problems or questions and I will help out asap.
Hi @nilslice thank you for your quick feedback :) I think this is my first issue here :) so do not worry I just need types list for now.
I'll check your solution out this evening and I keep you informed.
Otherwise, don't you think types can be a valid update in your current API. I mean without hack Thank you
Oops, you are right - the other issue is by a similar username - sorry about that!
The reason I removed this endpoint from the list if defaults was so that there was no way to scan the Internet for Ponzu APIs, quickly get all the types and iterate through them calling the content endpoints and download all of your CMS's data. Also, many times various types contain sensitive data that could be dangerous to expose by default.
Closing this issue. It appears to be answered/resolved. Please reopen if not the case.
Hello thank you for ponzu !
I was looking for a way to get existing types from ponzu via the api (andclient), and can not figure out if this is possible in the current version.
I have a use case where I need the list of types .
Thank you !