Community Contributed
Sample Gallery
Ready-to-use Dev Proxy configurations and presets from the community. Browse, search, and download from pnp/proxy-samples.
54 samples
Simulate the Google Gemini API
This sample contains mock responses that allow you to simulate the Google Gemini API using Dev Proxy. Simulating the Gemini API is useful when you're working on parts of your app that don't require a real response from Gemini and don't want to incur unnecessary API costs.
Simulate random errors on the Anthropic Claude API
This sample contains a preset and error responses to simulate random API errors on the Anthropic Claude API. The preset includes all documented error types: invalid request (400), authentication error (401), permission error (403), not found (404), request too large (413), rate limit (429), internal server error (500), and overloaded (529). The proxy randomly fails requests with one of these errors to help you verify your app's error handling.
Simulate throttling of the Anthropic Claude API
This sample contains a preset and error responses to simulate the throttling of the Anthropic Claude API. As more and more applications use the Claude API for AI-powered features, it's important that developers can verify that their apps properly handle cases when the API is throttled. The preset includes 5 different throttling scenarios: requests per minute exceeded, input tokens per minute exceeded, output tokens per minute exceeded, acceleration limit with dynamic Retry-After, and API overloaded (529). The proxy simulates throttling using one of these modes at random.
Simulate the Anthropic Claude API
This sample contains a preset and mock responses that allow you to simulate the Anthropic Claude Messages API using Dev Proxy. Simulating the Claude API is useful when you're working on parts of your app that don't require a real response from Claude and don't want to incur unnecessary API costs.
Demo: Check if my app is calling APIs using minimal permissions
This sample illustrates how to use Dev Proxy to check if your app is calling APIs using minimal permissions. The sample contains a mock CRUD API secured with Microsoft Entra. Different API operations require different scopes. The mock CRUD API is described using an OpenAPI spec including information about the available operations and the necessary scopes for each of them. By uploading the OpenAPI to Azure API Center, and calling the API, you can use Dev Proxy to check if your app is calling the API using the minimal permissions required.
Generate an OpenAPI spec for any API
This sample contains a preset that allows you to generate an OpenAPI spec for any API. By specifying the URLs of the API for which you want to generate an OpenAPI spec, Dev Proxy will intercept all requests to that API and generate an OpenAPI spec based on the requests and responses.

Simulate rate limiting on APIs published on Azure API Management
This sample contains a preset to simulate the rate limit policy for an API published on Azure API Management. Azure API Management allows you to define rate limits for your APIs to prevent abuse and ensure that your APIs are available for all consumers. The rate limit policy allows you to define the number of requests that can be made to an API within a specified time window. When the rate limit is exceeded, the API returns a 429 Too Many Requests response.
Simulate Azure OpenAI to GitHub Models failover
This sample demonstrates how to test failover logic from Azure OpenAI to GitHub Models using Dev Proxy. The sample includes a chat app that attempts to use Azure OpenAI as the primary provider and automatically fails over to GitHub Models when Azure OpenAI is unavailable. Key benefit: You don't need an actual Azure OpenAI deployment to test failover! Dev Proxy simulates Azure OpenAI failures, and the app falls back to GitHub Models using just your GitHub token.
Simulate Azure AI Responsible AI Filters
This sample contains mock responses that simulate Azure OpenAI's Responsible AI content filtering behavior. It helps developers test how their applications handle filtered, blocked, or modified responses based on Azure's content safety policies. The sample covers all content filter categories including hate, sexual, violence, self-harm, jailbreak attacks, and protected material detection. Using this sample, developers can implement proper error handling for Responsible AI filtered responses without needing to trigger actual content filters.
Simulate API degradation scenarios
This sample demonstrates how to simulate various API degradation scenarios including intermittent errors, rate limiting, and slow responses to test your application's resilience.
Demo: Simulate random error responses from Microsoft 365 APIs
This sample contains a demo web application connected to Microsoft Graph. Using Dev Proxy, you can simulate random errors returned by Microsoft Graph and see how the app handles them.
Simulating API key authentication
Demonstrates how to simulate API key authentication for mock APIs using Dev Proxy with AuthPlugin and MockResponsePlugin.
Demo: Generate an OpenAPI spec for an API called from a JavaScript app
This sample contains a demo web application connected to a placeholder API. Using Dev Proxy, you can record the API calls made by the sample app and generate an OpenAPI spec for them.
Demo: Simulate random error responses from a custom API
This sample contains a demo web application connected to a placeholder API. Using Dev Proxy, you can simulate random errors returned by the API and see how the app handles them.
Simulate throttling of the GitHub Models inference API
This sample contains a preset and mocks to simulate the throttling of the GitHub Models inference API. As more and more applications use GitHub Models inference API to use AI, it's important that developers can verify that their apps can properly handle cases when the API is throttled. Using this preset you can simulate throttling of the GitHub Models inference API and see how your app will handle it. The preset includes 2 different throttling scenarios: exceeded requests per minute, and exceeded requests per day. Dev Proxy will simulate throttling the API using one of these modes at random.
Simulate rate limiting on GitHub APIs
This sample contains a preset to simulate rate limiting on GitHub APIs. GitHub APIs support rate limiting, which is a mechanism that informs developers of the available server resources and allows them to increase the data throughput by staying under the rate limits and avoiding throttling.
Simulate errors on Microsoft Graph with HTTP Cats
Testing doesn't have to boring! Use this preset to return funny cat images when simulating erroneous HTTP status codes for Microsoft Graph. This preset contains images for the following HTTP status codes: 429, 500, 502, 503, 504 and 507. When you test your app in the browser, and the Dev Proxy returns one of these status codes, you will see a funny cat image instead of a boring error message. Have fun! 🐱 HTTP cat pictures by Tomomi Imura.

Test AI app against LLM failure modes
Sample chat application that demonstrates how to test AI applications against common LLM failure modes using the LanguageModelFailurePlugin.
Improve your app security when calling Microsoft Graph
This sample demonstrates how to use Dev Proxy to improve your app security when calling Microsoft Graph API. Using this sample you use Dev Proxy to check for minimal permissions, check if you are using excessive permissions, and prevent permission scope creep.

JSONPlaceholder API mocks
Demonstrates how Dev Proxy can mock API responses using the popular JSONPlaceholder API as an example. Perfect for learning how Dev Proxy intercepts and replaces API calls with mock responses.
Generate and test JWTs with Dev Proxy
Demonstrates how to use devproxy jwt create to generate JSON Web Tokens for testing API authentication scenarios with a simulated CRUD API secured by JWT validation.
CRUD APIs with Northwind database data
This sample contains a CRUD API for the 'Connect Copilot for Microsoft 365 to your external data in real-time with message extension plugins built with .NET and Visual Studio' learn module. The CRUD API simulates the behavior of a custom API protected with Microsoft Entra that returns product data. Using this preset you can complete exercises from the learn module without having to create a real custom API.
Mocks for the "Get started with Microsoft Graph Toolkit" learn module
This sample contains mocks for the "Get started with Microsoft Graph Toolkit" learn module. The mocks allow you to simulate the behavior of the Microsoft Graph API without making actual requests to the service.
Simulate combined token and request rate limiting for LLM applications
This sample demonstrates how to combine the LanguageModelRateLimitingPlugin and RateLimitingPlugin to simulate realistic throttling scenarios that developers encounter when building applications that use language models (LLMs) in production. The sample includes an interactive AI Code Review Assistant demo app that uses GitHub Models API for code analysis and a mock API for fetching code snippets. Run it with 'npx http-server' to see both rate limiting types in action. Perfect for testing how your application handles token limits, request limits, or both simultaneously. Includes aggressive limiting config for quick testing and stress-test functionality.
Track language model usage and costs
This sample web application demonstrates how to use Dev Proxy to monitor and track LLM usage and costs.
Simulate creating a Microsoft Graph connector and its schema
This sample contains a Dev Proxy mock file that simulates responses for creating a Microsoft Graph connector and provisioning its schema. Provisioning Graph connector schema is a long-running operation, and to simulate checking the status of the provisioning operation, the mock uses simulating the n-th request feature of the Developer Proxy.
Simulate rate limiting on Microsoft Graph APIs
This sample contains a preset to simulate rate limiting on Microsoft Graph APIs. Selected Microsoft Graph endpoints support rate limiting, which is a mechanism that informs developers of the available server resources and allows them to increase the data throughput by staying under the rate limits and avoiding throttling.
Microsoft Graph mocks from Microsoft Graph API docs
This sample contains mocks for the Microsoft Graph API based on the Microsoft Graph API documentation. Mocks are created based on sample requests and responses included in the Microsoft Graph documentation. Using these mocks, you can simulate calling Microsoft Graph API without having to connect to the actual service. This is useful for testing and development purposes. These mocks are also helpful when you want to demo time-sensitive functionality such as recently opened files, without having to generate activity on your tenant for Microsoft Graph to return the data. The sample contains three mock files: mocks for Microsoft Graph v1.0 endpoints (graph-v1_0-proxy-mocks.json), mocks for Microsoft Graph beta endpoints (graph-beta-proxy-mocks.json) and mocks combining both v1.0 and beta endpoints (graph-proxy-mocks.json).
Microsoft Graph mocks from Microsoft Graph API docs with sandbox data
This sample contains mocks for the Microsoft Graph API based on the Microsoft Graph API documentation. Mocks are created based on sample requests and responses included in the Microsoft Graph documentation. Mocks are extended with the data from sandbox, which is used by Microsoft Graph Explorer and other Microsoft's properties. Using these mocks, you can simulate calling Microsoft Graph API without having to connect to the actual service. This is useful for testing and development purposes. These mocks are also helpful when you want to demo time-sensitive functionality such as recently opened files, without having to generate activity on your tenant for Microsoft Graph to return the data. The sample contains three mock files: mocks for Microsoft Graph v1.0 endpoints (graph-v1_0-proxy-mocks.json), mocks for Microsoft Graph beta endpoints (graph-beta-proxy-mocks.json) and mocks combining both v1.0 and beta endpoints (graph-proxy-mocks.json).
Minimal JavaScript browser app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with JavaScript in a browser
Minimal .NET Aspire app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with .NET Aspire
Minimal ASP.NET MVC app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with an ASP.NET MVC application
Minimal Blazor app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a Blazor WebAssembly application
Minimal .NET console app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a .NET console application
Minimal Java console app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a Java console application
Minimal Node.js app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a Node.js application
Minimal PowerShell script using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a PowerShell script
Minimal Python app using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a Python application
Minimal SPFx web part using Dev Proxy
Demonstrates the minimal setup to use Dev Proxy with a SharePoint Framework web part
Auto-generate mocks from production traffic
Demonstrates how to use Dev Proxy's MockGeneratorPlugin to automatically generate mock files from real API traffic. Record once, mock forever - no manual mock creation needed.
CRUD APIs with Northwind database data
This sample contains a set of CRUD APIs based on the Northwind database data. Use this API to get mock data in your app. This sample contains mock CRUD APIs for product categories, customers, employees, orders, products, shippers, suppliers and territories. See the sample readme on GitHub for the list of available endpoints.
Simulate throttling of the OpenAI API
This sample contains a preset and mocks to simulate the throttling of the OpenAI API. As more and more applications use OpenAI API to use AI, it's important that developers can verify that their apps can properly handle cases when the API is throttled. Especially when the app is using lower-tier API plans, throttling is more likely to happen so validating the app's behavior is crucial to ensure great user experience. Using this preset you can simulate throttling of the OpenAI API and see how your app will handle it. The preset includes 3 different throttling scenarios: exceeded tokens per minute, exceeded number of requests per minute and service overload, which includes dynamic simulation of handling retry-after. Proxy will simulate throttling the API using one of these modes at random.
Simulate random errors on PayPal APIs
This sample contains a preset to simulate random errors on PayPal APIs. Sample errors are modeled after the information from the official PayPal Postman collection.
Simulate rate limiting and errors on Postmark APIs
This sample contains a preset to simulate rate limiting and random errors on Postmark APIs. Postmark APIs support rate limiting, which is a mechanism that informs developers of the available server resources and allows them to increase the data throughput by staying under the rate limits and avoiding throttling.
Detect minimal permissions for SharePoint REST and CSOM APIs.
Detect minimal permissions for SharePoint REST and CSOM APIs. This preset contains a an OpenAPI spec of SharePoint REST APIs and documentation of permissions required by SharePoint CSOM APIs. Using this information allows you to effortlessly find out the minimal permissions that your app needs to use the select SharePoint APIs.
Simulate rate limiting on Resend APIs
This sample contains a preset to simulate rate limiting on Resend APIs. Resend APIs support rate limiting, which is a mechanism that informs developers of the available server resources and allows them to increase the data throughput by staying under the rate limits and avoiding throttling.
Simulate Azure OpenAI API
This sample contains a preset that allows you to easily simulate the Azure OpenAI API using Dev Proxy. Simulating Azure OpenAI using Dev Proxy is useful when you're working on parts of your app that don't require a real-response from an LLM and don't want to incur unnecessary costs.
Simulate OpenAI API
This sample contains a preset that allows you to easily simulate the OpenAI API using Dev Proxy. Simulating OpenAI using Dev Proxy is useful when you're working on parts of your app that don't require a real-response from an LLM and don't want to incur unnecessary costs.
Preset for SharePoint Framework solutions
This sample contains a preset for simulating Microsoft Graph and SharePoint API errors for use with SharePoint Framework solutions. It contains specific URL exclusion rules to ensure that the API behind the hosted SPFx workbench is not intercepted by the proxy.
Build complete app with zero backend
Demonstrates building a complete task manager application with zero backend using Dev Proxy. Features a vanilla JavaScript frontend with full CRUD operations, API key authentication, realistic latency simulation, and Chrome DevTools integration.
Twilio API Mocks
Comprehensive mock responses for Twilio REST API to test messaging, voice, and phone number operations without live API calls
Twilio API resilience testing
Test how your app handles Twilio API errors, rate limiting, and slow responses using Dev Proxy
Stripe API resilience testing
Test how your app handles Stripe API errors, rate limiting, and slow responses
CRUD API secured with Microsoft Entra
This sample demonstrates how to simulate a CRUD API secured with Microsoft Entra authentication. It includes a demo web application that shows authentication with different scopes and CRUD operations with Bearer token authorization.