REST API mocks
Design OpenAPI-backed REST mocks in A²D: define APIs and endpoints, attach mock scenarios, expose a stable public URL for clients, and publish REST assets to the Agentic Asset Library when your org allows it.
Overview
REST API assets live alongside MCP servers and agent cards. Each API has a base path, optional authentication configuration, and endpoints (method, path template, request/response shapes). Mock scenarios select which response to return based on conditions (headers, query, path, body), similar to MCP mock behavior.
The product serves traffic at:
{deployment}/api/platform/{restApiId}/api/{...path}Discovery document:
GET {deployment}/api/platform/{restApiId}/api/openapi.jsonReplace {restApiId} with the UUID of your REST API asset from the UI or API.
Working in the UI
Use REST APIs in the main navigation to:
- Browse and search APIs your organization owns
- Create a blank API or upload an OpenAPI document to import structure
- Edit metadata, base path, CORS, and auth settings on the API detail page
- Add or edit endpoints and wire mock scenarios for each operation
Imported OpenAPI content is stored for traceability; you can regenerate or adjust endpoints after import.
AI-assisted authoring
When your organization has a default LLM configuration, the app can help with REST assets:
- Generate REST endpoints — Propose operations from a short description
- Generate REST scenarios — Propose mock condition/response pairs for REST endpoints
- Generate full REST API — Propose a complete API with endpoints, schemas, and scenarios from a brief prompt
These map to authenticated API routes under /api/ai/ (same BYOK model as MCP and agent card generation). See AI-assisted features for configuration.
Import and export
- Import REST API — Bring a spec into an organization via the dedicated import API and UI flows
- Export REST API — Export the design (including OpenAPI-oriented views) for backup or reuse
Bundled flows live next to existing MCP and agent card import/export under Import / Export.
Platform MCP
Organization API keys for Platform MCP can call tools such as list_rest_apis, search_rest_apis, get_rest_api, get_rest_api_openapi_spec, design_rest_api, update_rest_api, delete_rest_api, and endpoint-oriented tools for adding or updating operations. Use these when automating REST API design from an agent instead of the UI.
See Platform MCP for transport, authentication, and the full tool catalog.
Agentic Asset Library and tests
REST APIs use the rest_api asset type in shared library and testing flows where enabled: you can publish copies, rate assets, and include REST APIs in test lab or framework contexts that support multiple asset types. See Agentic Asset Library and Testing Framework (A2TF).
Next Steps
- Consuming MCP via REST API — Related patterns for calling hosted platform APIs
- API Reference — Platform, org, and AI endpoints (REST platform paths are being expanded here)
- Platform MCP — Automate REST API specs with MCP tools
- AI-assisted features — Configure models and generation options
Use REST API mocks when your integrators need HTTP/OpenAPI contracts, not MCP JSON-RPC.