Skip to main content
CYPEX Documentation
Support
v2.0.0 Latest stable release View changelog ->

Calling server side code

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.

Read full post

REST API

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.

Read full post

Internal 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).

Internal API vs REST API

CYPEX exposes two different HTTP surfaces. They are not interchangeable:

REST APIInternal API
What it exposesYour queries (database views), as PostgREST endpointsCYPEX platform endpoints — administration, authentication, connectors, audit
Who it is forApplications and external consumers of your dataPlatform administration
Access controlPostgreSQL grants and Row-Level SecurityBackend authorization; System Administrator only
Where the spec comes fromGenerated by PostgREST from the exposed schemaGenerated 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.

Read full post