A workflow is a good start if you want to build an application. However, sometimes it’s still necessary to add control elements. In this section, you’ll learn to add buttons and to write server side code to make your application even more powerful.
CYPEX lets you write PostgreSQL functions directly in the admin panel. Those functions are served by PostgREST, the same component that serves your queries: a function in the exposed schema becomes an RPC endpoint at /rpc/<function_name>, called with POST and executed as the role in the caller’s JWT. Data and logic therefore travel the same path and obey the same PostgreSQL permissions.
The CYPEX data API is an integral part of the system. Every query is automatically exposed as an API endpoint. The infrastructure honors access privileges and automatically keeps the API up to date.
The general purpose of the API is to allow users to build custom apps which are hard to create with the built-in WYSIWYG editor. In addition, it allows for easier integration with other infrastructure components. It is important to understand in this context that CYPEX is not “all or nothing” — it is perfectly feasible to use only the API.
Data & Content → Internal API lets you explore and test the CYPEX backend’s
own endpoints, rendered from its generated OpenAPI specification.
This screen is System Administrator only (system admin visibility).
CYPEX exposes two different HTTP surfaces. They are not interchangeable:
| REST API | Internal API |
|---|
| What it exposes | Your queries (database views), as PostgREST endpoints | CYPEX platform endpoints — administration, authentication, connectors, audit |
| Who it is for | Applications and external consumers of your data | Platform administration |
| Access control | PostgreSQL grants and Row-Level Security | Backend authorization; System Administrator only |
| Where the spec comes from | Generated by PostgREST from the exposed schema | Generated from the backend’s OpenAPI specification |
If you are integrating an external system with your CYPEX data, use the
REST API. The Internal API is an administration and debugging surface.