Documentation

Login
Introduction

Welcome to the PHPBaaS (PHP Backend as a Service) documentation. This guide will help you understand how to use our API to build your applications quickly and efficiently.

PHPBaaS provides the following services:

  • Authentication - User management and authentication
  • Database - NoSQL-like database with collections and documents
  • Storage - File upload and download capabilities
  • API Keys - Secure access to your project's data

All API endpoints return JSON responses and use RESTful conventions.

Getting Started
1. Create an Account

Start by creating an account or logging in if you already have one.

2. Create a Project

After logging in, create a new project from your dashboard. Each project acts as a separate workspace with its own data, files, and API keys.

3. Get Your API Key

Every project comes with a default API key. You can also create additional keys with different permissions (read-only, write-only, or both).

4. Set Up Your Collections

Create collections to organize your data. Think of collections as tables in a traditional database.

5. Integrate with Your Application

Use our API endpoints to connect your application to PHPBaaS services.

Authentication

PHPBaaS offers two types of authentication:

1. User Authentication

For front-end applications where users need to register and log in.

POST /api/auth.php?route=register
POST ./api/auth.php?route=login
2. API Key Authentication

For server-to-server communication and backend access.

// Include your API key in all requests
X-API-Key: your_api_key_here

View Authentication Documentation

Database

Store and retrieve data using collections and documents.

Collections

Organize your data into collections, similar to tables in a traditional database.

GET /api/database.php?route=collections
POST ./api/database.php?route=collections
Documents

Store JSON documents within collections.

GET /api/database.php?route=documents&collection_id=123
POST ./api/database.php?route=documents&collection_id=123

View Database Documentation

File Storage

Upload, download, and manage files.

File Upload
POST /api/files.php?route=upload
File Download
GET /api/files.php?route=download&id=123

View Storage Documentation

API Keys

Generate and manage API keys for your projects.

Permissions
  • Read Only - Only allows GET requests
  • Write Only - Only allows POST, PUT, DELETE requests
  • Read & Write - Allows all request types

View API Keys Documentation