Endpoints
Every Cordice deployment publishes its own addresses. Rather than hard-coding them, ask the API root for a discovery document and read the rest from there — that is how the official clients find everything, and it is what lets a self-hosted instance work without a patched client.
GET https://app.cordice.org/api/
The response describes the instance: its version, which features are enabled, and the URL of every service that is.
The reference instance
| Service | URL | What it is |
|---|---|---|
| API | https://app.cordice.org/api | REST endpoints |
| Events | wss://app.cordice.org/ws | The WebSocket protocol |
| Files | https://app.cordice.org/autumn | Uploads and attachments |
| Embeds | https://app.cordice.org/january | Link previews |
This instance runs the same code as the repository and is where the clients point today. Treat the addresses as belonging to that instance rather than to Cordice as a project: read them from the discovery document and your client will keep working when they change.
Self-hosted instances
An instance is identified by its API root. Anything else — the events URL, the file service, the size limits, whether registration is open — comes from the discovery document, so a client that reads it needs no configuration beyond a single address.