API Overview
Piora provides a complete REST API that lets you programmatically manage servers, applications, databases, and other resources. The API is ideal for automation workflows, third-party integrations, or building custom management tools.
API Basics
Section titled “API Basics”Base URL
Section titled “Base URL”https://app.piora.dev/api/v1Request Format
Section titled “Request Format”All API requests use JSON format:
curl -X GET https://app.piora.dev/api/v1/servers \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"Response Format
Section titled “Response Format”API responses use JSON with the following structure:
{ "success": true, "data": { // Response data }, "meta": { "page": 1, "per_page": 20, "total": 45 }}Error response:
{ "success": false, "error": { "code": "RESOURCE_NOT_FOUND", "message": "The specified server was not found" }}API Endpoints
Section titled “API Endpoints”Servers
Section titled “Servers”| Method | Endpoint | Description |
|---|---|---|
GET | /servers | List all servers |
GET | /servers/:id | Get server details |
POST | /servers | Add a server |
DELETE | /servers/:id | Remove a server |
GET | /servers/:id/stats | Get server stats |
Applications
Section titled “Applications”| Method | Endpoint | Description |
|---|---|---|
GET | /applications | List all applications |
GET | /applications/:id | Get application details |
POST | /applications | Create an application |
PATCH | /applications/:id | Update application settings |
DELETE | /applications/:id | Delete an application |
POST | /applications/:id/deploy | Trigger deployment |
POST | /applications/:id/rollback | Rollback deployment |
Databases
Section titled “Databases”| Method | Endpoint | Description |
|---|---|---|
GET | /databases | List all databases |
POST | /databases | Create a database |
DELETE | /databases/:id | Delete a database |
Domains
Section titled “Domains”| Method | Endpoint | Description |
|---|---|---|
GET | /applications/:id/domains | List application domains |
POST | /applications/:id/domains | Add a domain |
DELETE | /applications/:id/domains/:domainId | Remove a domain |
Pagination
Section titled “Pagination”List endpoints support paginated queries:
GET /api/v1/applications?page=1&per_page=20| Parameter | Description | Default |
|---|---|---|
page | Page number | 1 |
per_page | Items per page | 20 |
Rate Limits
Section titled “Rate Limits”The API has the following rate limits:
| Level | Limit |
|---|---|
| Per minute | 60 requests |
| Per hour | 1000 requests |
When limits are exceeded, the API returns a 429 Too Many Requests status code.
Related Resources
Section titled “Related Resources”- Authentication — How to obtain and use API tokens
- CLI — Command-line tool
- Webhooks — Receive event notifications
- SDK — Language SDKs