# Getting Started with Our API
By the end of this tutorial, you'll have made your first API call.
## Prerequisites
- An API key (get one at dashboard.example.com)
- curl or any HTTP client
## Step 1: Test Your Key
Run this command (replace YOUR_KEY):
curl -H "Authorization: Bearer YOUR_KEY" \
https://api.example.com/health
You should see: {"status": "ok"}
## Step 2: Make Your First Request
...
# How to Rotate Database Credentials
## When to Use This
Use this guide when credentials are compromised or
during scheduled rotation.
## Steps
1. Generate new credentials in AWS Secrets Manager
2. Update the application config:
```bash
kubectl set env deployment/api DB_PASSWORD=$NEW_PASS
defcalculate_retry_delay(attempt:int,base_delay:float=1.0)->float:"""
Calculate exponential backoff delay for retries.
Uses jittered exponential backoff to prevent thundering herd.
Max delay capped at 60 seconds.
Args:
attempt: Current attempt number (0-indexed)
base_delay: Initial delay in seconds
Returns:
Delay in seconds before next retry
Example:
>>> calculate_retry_delay(0) # First retry
1.0
>>> calculate_retry_delay(3) # Fourth retry
8.0 # (approximately, with jitter)
"""
# Service Name
One sentence: what this does.
## Quick Start
docker-compose up
curl localhost:8080/health
## Documentation
- [Getting Started](docs/getting-started.md)
- [API Reference](docs/api.md)
- [Deployment](docs/deploy.md)
## Development
make test
make lint
README is the front door. Keep it minimal, link to details.
# Bad
The user management system allows administrators to
perform various operations on user accounts...
# Good
To create a user:
curl -X POST /users -d '{"name": "Alice"}'