Dynamically inspect Convex API
Hi!
I noticed that
api
and internal
are empty if I try to print the keys of them in my actions/mutations/queries.
I'd like to dynamically introspect them (so I can show something similar to what you do in the dashboard).
Is that possible?2 Replies
There's no API for this now. This is on the roadmap, both exporting generated code for any language and exporting a manifest you could traverse yourself at runtime.
Note that this woudl likely require CLI-like admin auth, or would require opting in somehow. Obscurity isn't much security but adding a public API to list every public query/mutation/action from a make Convex deployments easier to scan for inadvertently insecure APIs.
That would definitely make sense.
And I'd definitely want auth on that endpoint regardless. 🙏