Services AI-generated
A Service groups Reactions under one URL prefix (an LDAP BaseDN, in an LDAP-mode environment). When a request comes in, MockMotor resolves the Service by longest-prefix match against its Base URL, then looks inside that service for a matching Reaction.
Base URL / BaseDN
In an HTTP environment this is a URL path prefix, e.g. /Account. In an LDAP environment the same field is relabeled Bind/Base DN Suffix and holds a DN suffix such as ou=Accounts,o=Example - the match is a DN-suffix match, not a literal string comparison, so case and incidental whitespace in the DN's attribute types don't matter. A service with an empty/root Base URL acts as a catch-all, matched only when nothing more specific fits.
Fine-Tuning
- Generate CORS Headers - Auto reflects the request's CORS preflight automatically; Disabled turns that off if you want to author CORS headers yourself. See CORS & Auth Basics.
- Use Index for Matching - builds an elimination index over the service's reactions so matching stays fast even with many reactions/conditions. Turn it off only if you suspect the index itself is misbehaving for a specific case.
- Use GraphQL Parsing Trick - a performance optimization for services that host GraphQL reactions with heavy query/mutation matching.
Creating a service
Three ways to start:
- Empty - "Add Service" on the Services page; ports are auto-assigned, nothing to fill in manually to get started.
- From WSDL - the WSDL file must be downloaded locally first (MockMotor doesn't fetch it over the network for you). Import creates one reaction per WSDL operation, each initially configured to return a SOAP Fault - update the payload, status and delay for each operation you actually want to mock.
- From OpenAPI - creates a REST service with one reaction per OpenAPI operation, each initially returning HTTP 500 with a dummy payload, ready to be filled in per operation.
Service actions
From an open service you can Export it to a zip (for backup, or to move it to another MockMotor instance - importing it there assigns fresh ports), Clone To Environment (copy the whole service and its reactions into another environment within the same instance, with fresh ports and, where possible, its account-property references carried along), Delete Cached Reactions (clear any response caching without touching the reactions themselves), or Delete the service outright.