{ "opencollection": "1.0.0", "info": { "name": "Beeceptor Endpoint Settings Mock Rules API", "version": "2.0.0" }, "items": [ { "info": { "name": "Mock Rules", "type": "folder" }, "items": [ { "info": { "name": "Get all rules", "type": "http" }, "http": { "method": "GET", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" } ], "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Retrieves all mock rules configured for the specified endpoint. Rules define how Beeceptor \nprocesses incoming HTTP requests and generates responses.\n\n**How Rules Work:**\n- Rules are evaluated in a **top-to-bottom order** (first match wins)\n- Each rule contains **conditions** (request matching criteria) and an **action** (response behavior)\n- When a request arrives, Beeceptor evaluates rules sequentially until the first matching rule is found\n- Once matched, the rule's action is executed and no " }, { "info": { "name": "Create a new rule", "type": "http" }, "http": { "method": "POST", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Creates a new mock rule and appends it to the **end of the rule list** (lowest priority). \nThe rule will be evaluated last in the execution order.\n\n**Purpose:**\nA mock rule encapsulates conditions (request matching criteria) and actions (response behavior). \nRules are the core building blocks that define how your mock server responds to incoming requests.\n\n**How It Works:**\n1. **Rule Structure**: Each rule consists of:\n - `enabled`: Boolean flag to activate/deactivate the rule\n - `method`: H" }, { "info": { "name": "Bulk replace all rules", "type": "http" }, "http": { "method": "PUT", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Atomically replaces **all existing rules** with a new set of rules. This is a destructive \noperation that completely overwrites the current rule configuration.\n\n**Purpose:**\n- Sync rules from version control or external systems\n- Restore rules from backup\n- Deploy rule configurations across multiple environments\n- Perform bulk rule updates without individual API calls\n\n**How It Works:**\n1. **Atomic Replacement**: All existing rules are deleted and replaced in a single transaction\n2. **Rule Order" }, { "info": { "name": "Delete all rules", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" } ], "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Permanently deletes **all mock rules** configured for the endpoint. This is a destructive \noperation that cannot be undone.\n\n**Purpose:**\n- Reset endpoint to default state (no custom rules)\n- Clean up before importing new rule configurations\n- Remove all mocking behavior and rely on fallback mechanisms\n\n**Post-Deletion Behavior:**\nAfter all rules are deleted, incoming requests will follow the fallback chain:\n1. **Local Tunnel**: If enabled, requests are forwarded to localhost\n2. **HTTP Proxy**: " }, { "info": { "name": "Reorder rules", "type": "http" }, "http": { "method": "POST", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules/reorder", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Reorders the existing mock rules by priority without modifying the rule content.\n\n**How It Works:**\n- Provide an ordered list of rule IDs in `order`\n- Rules listed in `order` are moved to the top in the exact sequence provided\n- Any rules not listed keep their relative order and are appended after the reordered block\n\n**Validation:**\n- All rule IDs in `order` must exist for the endpoint\n\n**Use Cases:**\n- Promote a rule to higher priority\n- Restore a known execution order after experiments\n\n**Res" }, { "info": { "name": "Get a single rule", "type": "http" }, "http": { "method": "GET", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules/:ruleId", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" }, { "name": "ruleId", "value": "vshn31wteh", "type": "path", "description": "The unique identifier of the rule (auto-generated during creation)." } ], "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Retrieves the complete configuration of a specific mock rule by its unique identifier.\n\n**Purpose:**\n- Inspect rule details programmatically\n- Verify rule configuration after creation/update\n- Debug rule matching behavior\n\n**Response Format:**\nReturns the complete rule object with:\n- `id`: Unique identifier\n- `enabled`: Active status\n- `method`: HTTP method filter\n- `description`: Human-readable label\n- `conditions`: Array of matching criteria\n- `action`: Response behavior configuration\n\n**Use C" }, { "info": { "name": "Update a rule (full replacement)", "type": "http" }, "http": { "method": "PUT", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules/:ruleId", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" }, { "name": "ruleId", "value": "vshn31wteh", "type": "path", "description": "The unique identifier of the rule to update." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Performs a **complete replacement** of an existing mock rule. All fields must be provided \nin the request body, as this is not a partial update.\n\n\n**How It Works:**\n1. **Full Replacement**: The entire rule object is replaced with the new configuration\n2. **ID Preservation**: The rule ID remains unchanged (specified in the URL path)\n3. **Position Preservation**: The rule maintains its position in the execution order\n4. **Validation**: The new rule configuration is validated before replacement\n " }, { "info": { "name": "Update a rule (partial)", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules/:ruleId", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" }, { "name": "ruleId", "value": "vshn31wteh", "type": "path", "description": "The unique identifier of the rule to update." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Performs a **partial update** of an existing mock rule. Only the fields provided in the \nrequest body are modified; all other fields remain unchanged.\n\n**Purpose:**\n- Update specific rule fields without affecting others\n- Toggle rule enabled/disabled status\n- Modify individual conditions or actions\n- Update rule descriptions\n\n**How It Works:**\n1. **Partial Update**: Only specified fields are updated\n2. **Field Merging**: Provided fields overwrite existing values; omitted fields remain unchanged\n" }, { "info": { "name": "Delete a rule", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/rules/:ruleId", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" }, { "name": "ruleId", "value": "vshn31wteh", "type": "path", "description": "The unique identifier of the rule to delete." } ], "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Permanently deletes a specific mock rule by its unique identifier. This operation cannot be undone.\n\n**Purpose:**\n- Clean up unused mock configurations\n- Programmatically manage rule lifecycle\n\n**How It Works:**\n1. **Rule Removal**: The rule is removed from the endpoint's rule array\n2. **Order Adjustment**: Remaining rules maintain their relative order\n3. **Priority Shift**: Rules below the deleted rule move up in priority\n4. **Real-time Updates**: Connected dashboard clients are notified.\n\n\n**L" }, { "info": { "name": "Upload a blob file", "type": "http" }, "http": { "method": "POST", "url": "https://api.beeceptor.com/api/v2/endpoints/:endpoint/blobs", "params": [ { "name": "endpoint", "value": "order-service", "type": "path", "description": "The name of Beeceptor endpoint. E.g., you should pick `my-endpoint` from your mock server base URL `https://my-endpoint.proxy.beeceptor.com`)" } ], "body": { "type": "multipart-form", "data": [ { "name": "file", "type": "text", "value": "" } ] }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Uploads a binary file (e.g., image, JSON, PDF) to Beeceptor's storage. \nReturns a `blobPath` which can be used in a `MockAction` to serve this file \nas a response. Blobs are automatically managed and deleted by the system.\n" } ] } ], "bundled": true }