Quick Start
Get started with Restflow in 5 minutes
Create and run your first API test in minutes.
1. Create Your First Flow
Create a new file called api-test.flow:
### Test User API
GET https://jsonplaceholder.typicode.com/users/1
> assert status == 200
> assert body.id == 1
> assert body.name != null2. Run the Flow
Execute your test:
restflow run api-test.flowYou should see output like:
✓ Test User API
✓ GET /users/1 (200ms)
✓ status == 200
✓ body.id == 1
✓ body.name != null
Tests: 1 passed, 0 failed3. Add Variables
Make your tests dynamic with variables:
### Create a User
POST https://jsonplaceholder.typicode.com/users
Content-Type: application/json
{
"name": "{{randomString}}",
"email": "test-{{uuid}}@example.com"
}
> capture userId = body.id
### Get Created User
GET https://jsonplaceholder.typicode.com/users/{{userId}}
> assert status == 200
> assert body.id == {{userId}}4. Environment Configuration
Create a .env file for environment-specific settings:
# .env
BASE_URL=https://jsonplaceholder.typicode.com
API_KEY=your-api-keyUpdate your flow to use the BASE_URL:
### Get User with Environment
GET {{BASE_URL}}/users/1
Authorization: Bearer {{API_KEY}}
> assert status == 200Run with the environment:
restflow run api-test.flow --env .env5. Multiple Output Formats
JSON Output:
restflow run api-test.flow --format jsonSummary View:
restflow run api-test.flow --format summary
RestFlow