Quick Start
title: Quick Start description: "Get started with ReqSmith in minutes"​
Quick Start
This guide will help you make your first API request with ReqSmith and explore its core features.
ReqSmith includes powerful AI features that can analyze APIs, suggest optimal requests, and help debug issues. Set up AI features in 2 minutes →
Your First Request​
Let's start with a simple GET request to test that ReqSmith is working:
reqsmith request get https://httpbin.org/get
This will:
- Make a GET request to httpbin.org
- Display the response with syntax highlighting
- Automatically add the request to your history
AI-Powered Request Suggestions​
Once you have AI set up, get intelligent suggestions for any API:
# Get AI suggestions for an API
reqsmith ai suggest --url https://api.github.com
# Analyze your last response with AI
reqsmith ai analyze
Basic Request Types​
ReqSmith supports all common HTTP methods:
GET Request​
reqsmith request get https://api.github.com/users/octocat
POST Request with JSON​
reqsmith request post https://httpbin.org/post \
--json '{"name": "John", "email": "john@example.com"}'
POST Request with Data​
reqsmith request post https://httpbin.org/post \
--data "name=John&email=john@example.com"
Request with Headers​
reqsmith request get https://api.github.com/user \
--header "Authorization: Bearer YOUR_TOKEN" \
--header "Accept: application/vnd.github.v3+json"
Request with Query Parameters​
reqsmith request get https://httpbin.org/get \
--param "page=1" \
--param "limit=10"
Working with Templates​
Templates let you save and reuse request configurations:
Save a Template​
reqsmith template save github-user \
--method GET \
--url "https://api.github.com/users/${USERNAME}" \
--header "Accept: application/vnd.github.v3+json" \
--description "Get GitHub user information"
Use a Template​
reqsmith template use github-user --var USERNAME=octocat
List Your Templates​
reqsmith template list
Environment Management​
Environments help manage different configurations (dev, staging, prod):
Create an Environment​
reqsmith env create development
Set Environment Variables​
reqsmith env set API_BASE_URL "https://api.dev.example.com"
reqsmith env set API_TOKEN "dev-token-123"
Switch Environment​
reqsmith env switch development
Use Environment in Template​
reqsmith template save api-endpoint \
--method GET \
--url "${API_BASE_URL}/users" \
--header "Authorization: Bearer ${API_TOKEN}"
reqsmith template use api-endpoint --env development
Request History​
ReqSmith automatically tracks all your requests:
View Recent Requests​
reqsmith history list --limit 10
Search History​
reqsmith history search "github.com"
Retry a Failed Request​
reqsmith history retry --failed
View Request Statistics​
reqsmith history stats
Response Formatting​
Control how responses are displayed:
JSON Format (Default)​
reqsmith request get https://httpbin.org/json
Table Format​
reqsmith request get https://httpbin.org/json --format table
Raw Format​
reqsmith request get https://httpbin.org/html --format raw
Save Response to File​
reqsmith request get https://httpbin.org/json --output response.json
Configuration​
Check your current configuration:
reqsmith config show
Common configuration options:
# Set default output format
reqsmith config set output.default_format table
# Set request timeout
reqsmith config set network.timeout_seconds 30
# Enable caching
reqsmith config set cache.enabled true
GraphQL Support​
ReqSmith supports GraphQL queries:
reqsmith request graphql https://api.github.com/graphql \
--query 'query { viewer { login name } }' \
--header "Authorization: Bearer YOUR_TOKEN"
Getting Help​
ReqSmith has comprehensive built-in help:
# General help
reqsmith help
# Command-specific help
reqsmith request --help
reqsmith template --help
# Getting started guide
reqsmith help getting-started
# View examples
reqsmith help examples
# Tips and tricks
reqsmith help tips
Next Steps​
Now that you've mastered the basics:
- Learn about Templates - Create reusable request configurations
- Explore Environments - Manage different deployment environments
- Set up AI Features - Get intelligent suggestions and validation
- Check out Examples - See ReqSmith in action with real APIs
Common Workflows​
API Testing Workflow​
# 1. Create environment
reqsmith env create testing
reqsmith env set API_BASE_URL "https://api.example.com"
reqsmith env set API_TOKEN "test-token"
# 2. Create templates
reqsmith template save list-users \
--method GET \
--url "${API_BASE_URL}/users"
reqsmith template save create-user \
--method POST \
--url "${API_BASE_URL}/users" \
--json '{"name": "${NAME}", "email": "${EMAIL}"}'
# 3. Run tests
reqsmith template use list-users --env testing
reqsmith template use create-user --env testing \
--var NAME="Test User" \
--var EMAIL="test@example.com"
# 4. Check results
reqsmith history stats
Development Workflow​
# Set up development environment
reqsmith env create dev
reqsmith env set API_BASE_URL "http://localhost:3000/api"
# Test local API
reqsmith request get "${API_BASE_URL}/health" --env dev
# Save common endpoints
reqsmith template save local-health \
--method GET \
--url "${API_BASE_URL}/health" \
--description "Health check for local API"
Ready to dive deeper? Explore the core concepts or check out more advanced examples!