logoRestFlow

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 != null

2. Run the Flow

Execute your test:

restflow run api-test.flow

You should see output like:

✓ Test User API
  ✓ GET /users/1 (200ms)
  ✓ status == 200
  ✓ body.id == 1
  ✓ body.name != null

Tests: 1 passed, 0 failed

3. 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-key

Update your flow to use the BASE_URL:

### Get User with Environment
GET {{BASE_URL}}/users/1
Authorization: Bearer {{API_KEY}}

> assert status == 200

Run with the environment:

restflow run api-test.flow --env .env

5. Multiple Output Formats

JSON Output:

restflow run api-test.flow --format json

Summary View:

restflow run api-test.flow --format summary

Next Steps