Mock Snapshots
Capture and share point-in-time snapshots of your mock simulation state, including request/response pairs, route configuration, and mock state data. Snapshots enable knowledge sharing, scenario reproduction, and collaboration across teams.
Prerequisites
- An existing mock simulation with routes and responses
- At least one completed request/response interaction
- Basic understanding of simulation structure
Understanding Snapshots
Snapshots capture:
- Request data - Method, path, headers, query parameters, body
- Response data - Status code, headers, response body
- Route configuration - Route settings at time of snapshot
- Simulation configuration - Simulation settings at time of snapshot
- Mock state - Variables, environments at time of snapshot (optional)
Snapshots are immutable point-in-time records useful for:
- Documenting API behaviors and edge cases
- Sharing examples with team members
- Testing client implementations
- Regression testing
- Knowledge base building
Taking a Snapshot
Snapshot from Request Log
Capture an actual request/response from your simulation traffic:
- Open simulation Request Log or Live Traffic
- Find a request/response pair you want to snapshot
- Click Create Snapshot or Save as Snapshot
- Fill in snapshot details:
{
"instanceId": "550e8400-e29b-41d4-a716-446655440000",
"routeId": "660e8400-e29b-41d4-a716-446655440000",
"requestData": {
"method": "POST",
"path": "/api/users",
"headers": { "Content-Type": "application/json" },
"body": { "name": "John Doe", "email": "john@example.com" }
},
"responseData": {
"statusCode": 201,
"headers": { "Content-Type": "application/json" },
"body": { "id": "user-123", "name": "John Doe", "email": "john@example.com" }
},
"title": "Create User - Success",
"description": "Successful user creation with all required fields",
"tags": ["happy-path", "user-api", "onboarding"],
"visibility": "workspace"
}
Manual Snapshot Creation
Create a snapshot without live traffic:
- Open the simulation
- Click Create Snapshot (in the Snapshots section)
- Manually enter request/response data:
- Method and path
- Headers and body
- Expected response status and body
- Route configuration
- Click Create
Snapshot Metadata
Fill in these optional details:
- Title - Short name (e.g., "Create User - Success")
- Description - What this snapshot demonstrates
- Tags - Categories (e.g., "happy-path", "error-case", "edge-case")
- Visibility - Who can access it:
private- Only youworkspace- Your company/workspacepublic- Anyone with the short ID
- Expiration - Optional ISO 8601 date when snapshot expires
Managing Snapshots
List Your Snapshots
- Open simulation or dashboard
- Click Snapshots or My Snapshots
- View your created snapshots with:
- Title and description
- Creation timestamp
- Creator name
- Visibility level
- Access count
List Simulation Snapshots
View all snapshots for a specific simulation:
- Open the simulation
- Click Snapshots tab
- See all snapshots for that simulation
- Filter by visibility or search by title
Find a Snapshot
Search snapshots by:
- Title or description
- Tags
- Creator name
- Simulation
- Date range
Sharing Snapshots
Get Snapshot Short ID
Each snapshot has a unique short ID (e.g., sn_abc123xyz):
https://surestage.io/snapshots/sn_abc123xyz
Share with Team
- Open snapshot
- Click Share
- Copy the snapshot URL
- Send to team members
- They can access based on visibility setting:
- Private: Only creator can access
- Workspace: Company members can access
- Public: Anyone with URL can access (no auth required)
Set Visibility Level
Change who can access a snapshot:
- Open snapshot
- Click Edit or gear icon
- Change Visibility:
private- Only youworkspace- Your companypublic- Anyone
- Save
Make Snapshot Public
Share a snapshot with external partners:
- Open snapshot
- Set visibility to
public - Copy short URL or QR code
- External users can view without logging in
- They see request/response data but cannot modify
Editing Snapshot Metadata
Update snapshot information (request/response data is immutable):
- Open snapshot
- Click Edit
- Update:
- Title
- Description
- Tags
- Visibility
- Expiration date
- Click Save
What Cannot Be Changed
Once created, these snapshot elements are immutable:
- Request data (method, path, headers, body)
- Response data (status, headers, body)
- Route configuration snapshot
- Simulation configuration snapshot
- Creation timestamp
- Creator information
This immutability ensures snapshots are reliable historical references.
Using Snapshots
View Snapshot Details
- Open a snapshot
- See organized view of:
- Request - Method, path, headers, body
- Response - Status, headers, body
- Route Config - Route settings at snapshot time
- Simulation Config - Simulation settings at snapshot time
- Metadata - Title, tags, visibility, timestamps
Copy Request
Copy snapshot request to test in your client:
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com"
}'
Test Against Mock Simulation
- Open snapshot
- Click Test Against Mock
- Choose target simulation
- Mock processes the request and shows result
- Compare with snapshot response
Snapshot Replay (Future)
Create a temporary replay simulation from snapshot:
- Open snapshot
- Click Create Replay Simulation
- Temporary mock simulation is created with snapshot data
- Test your client against it
- Click Destroy Replay when done
(Currently in development - check availability in your version)
Snapshot Use Cases
Documentation
Build knowledge base of API behaviors:
- Create snapshots for common scenarios
- Tag them (e.g., "success", "validation-error", "timeout")
- Share with new team members
- Link from API documentation
Example snapshots:
- Happy path workflows
- Error scenarios (4xx, 5xx)
- Edge cases (empty arrays, null values)
- Rate limit responses