data/ directory, simulating real backend APIs with various response structures.
Base URL
How It Works
The Fake API is built using a simple BusyBox httpd server that serves static files:data/ directory:
- Files are accessible at their path relative to
data/ - File extensions are preserved (
.json,.xml,.rss) - Directories create nested paths
Available Endpoints
The following endpoints are available based on the current file structure:Root Level Endpoints
Articles
Array Response
Campaign
Collection
Colors
Token
Broken JSON
User Endpoints
Get User by ID
Social Media Endpoints
Twitter Feed
Facebook Feed
Flickr Photos
Google Maps
YouTube Videos
Shop Endpoints
Products List
Product by ID
Campaigns List
Campaign by ID
Destination Endpoints
Destination by ID
Hotel Endpoints
Hotel by ID
JWK (JSON Web Key) Endpoints
Public Key
Private Key
Symmetric Key
Adding Custom Endpoints
To add your own mock endpoints:-
Create a JSON file in the
data/directory: -
Access it immediately at:
-
Create nested paths using directories:
Access at:
File Format Support
The Fake API can serve:- JSON files (
.json) - Most common format - XML files (
.xml) - For XML-based APIs - RSS feeds (
.rss) - For feed aggregation testing
Directory Structure Example
Testing with curl
Fetch any endpoint using curl:Usage in KrakenD Configuration
Reference these endpoints in your KrakenD configuration as backend hosts:http://fake_api:80 as the host (service name), not localhost:8000.