Using Bruno
Bruno is an open-source API client included with InstaCRUD for testing and debugging endpoints. The project includes a pre-configured Bruno workspace in the bruno/ folder.
Opening the Project
- Download and install Bruno
- Open Bruno and select Open Collection
- Navigate to the
bruno/folder in the InstaCRUD repository
Project Structure
bruno/
├── environments/
│ └── local.bru # Local environment config
├── collection.bru # Collection-level auth settings
├── system/ # System endpoints
│ ├── Signin.bru
│ ├── Signup.bru
│ ├── Heartbeat.bru
│ └── getSettings.bru
├── admin/ # Admin endpoints
│ ├── Onboard Organization.bru
│ ├── List Users.bru
│ └── ...
├── clients/ # Client entity CRUD
├── contacts/ # Contact entity CRUD
├── projects/ # Project entity CRUD
├── documents/ # Document entity CRUD
└── addresses/ # Address entity CRUD
Environment Setup
The local environment is pre-configured with:
baseUrl: http://localhost:8000
To select the environment:
- Click the environment dropdown in Bruno's top bar
- Select local
Authentication
Most endpoints require a bearer token. To authenticate:
1. Sign In
Run the system > Signin request with credentials:
{
"email": "east_admin@test.org",
"password": "eastpass"
}
The response includes a JWT token:
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": { ... }
}
2. Set Token
Copy the token value and update collection.bru:
auth:bearer {
token: eyJhbGciOiJIUzI1NiIs...
}
All requests in the collection will now use this token.
Running Requests
List Items
Each entity folder contains standard CRUD requests:
- List Items —
GET /{entity}with optionalskip,limit,filtersparams - Get Item —
GET /{entity}/{item_id} - Create Item —
POST /{entity} - Update Item —
PUT /{entity}/{item_id} - Patch Item —
PATCH /{entity}/{item_id} - Delete Item —
DELETE /{entity}/{item_id}
Example: List Clients
- Ensure the backend is running (
poetry run python instacrud/app.py) - Open clients > List Items
- Click Send
Example: Create Client
- Open clients > Create Item
- Edit the JSON body:
{
"code": "CLI001",
"name": "Acme Corp",
"type": "COMPANY",
"description": "Test client"
}
- Click Send
Query Parameters
List requests support these parameters:
| Parameter | Description | Example |
|---|---|---|
skip | Items to skip (pagination) | 10 |
limit | Max items to return | 25 |
filters | JSON filter object | {"type":"COMPANY"} |
In Bruno, enable parameters by removing the ~ prefix in the Params tab.
Adding New Requests
To add a request for a new entity:
- Right-click in Bruno's sidebar
- Select New Request
- Configure method, URL using
{{baseUrl}}, and body - Save to the appropriate folder
Example request file structure:
meta {
name: List Items
type: http
seq: 1
}
get {
url: {{baseUrl}}/tasks
body: none
auth: none
}
params:query {
~skip:
~limit:
}
Summary
Bruno provides a fast way to:
- Test API endpoints during development
- Debug authentication flows
- Explore available endpoints
- Validate request/response formats
The pre-configured workspace includes requests for all built-in entities and authentication flows.