API Collection (Noodle)
The project ships with a Noodle collection that covers every v1 endpoint: login, logout, user creation, and profile management. Noodle is a terminal-based REST client — your requests live as YAML files in the repo, versioned next to the code they exercise.
The collection lives in api-collection/:
api-collection/
├── settings.yml
├── .environments/
│ └── local.env # base_url and dev credentials
├── auth/
│ ├── create-user.yml
│ ├── login.yml
│ ├── logout.yml
│ └── logout-all.yml
├── core/
│ └── ping.yml
└── profile/
├── get-profile.yml
├── patch-profile.yml
└── update-profile.yml
Installation
macOS (Homebrew):
Linux/macOS (install script):
Verify the installation:
Usage
Start the stack first — the collection points at http://localhost:8000 by default:
Then open the collection interactively:
Or run requests from the command line:
# Run every request in the collection
noodle collection run api-collection
# Run a single request
noodle request run core/ping --collection api-collection
Authentication
All endpoints except ping require a Knox token (Bearer). To authenticate:
- Send the login request (
auth/login) with your credentials — the seeded admin isadmin@admin.com/admin(see Database Seeding). - Copy the
tokenvalue from the response. - Store it as a secret so it is never written to the collection files:
Every authenticated request reads $token from that secret.
Environment Variables
Requests reference variables from api-collection/.environments/local.env:
| Variable | Default | Used for |
|---|---|---|
base_url |
http://localhost:8000 |
Prefix of every request URL |
email |
admin@admin.com |
Login / create / profile bodies |
password |
admin |
Login / create / profile bodies |
password2 |
admin |
User creation confirmation |
first_name |
Admin |
Profile update bodies |
last_name |
User |
Profile update bodies |
TOKEN |
(secret) | Bearer token for auth |
Edit local.env freely or add new files in .environments/ (e.g., staging.env) to switch environments from the Noodle UI.