Mock Workspaces
sfp server API reference for Mock Workspaces: 10 endpoints.
/sfp/api/mocks/workspacesRegisters WireMock stubs for every service in the definition. Re-activation replaces the baseline but preserves session overrides by service name.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/sfp/api/mocks/workspaces" \ -H "Content-Type: application/json" \ -d '{ "workspace": "string", "context": {}, "services": [ { "name": "string", "namedCredential": "string", "packageName": "string", "specSource": "source", "baselineRules": [ { "request": { "method": "string", "path": "string" } } ] } ] }'/sfp/api/mocks/workspacesAuthorization
access-token In: header
Response Body
curl -X GET "https://example.com/sfp/api/mocks/workspaces"/sfp/api/mocks/workspaces/{workspace}Authorization
access-token In: header
Path Parameters
Response Body
curl -X GET "https://example.com/sfp/api/mocks/workspaces/string"/sfp/api/mocks/workspaces/{workspace}restore=true reverts switched credentials first; force=true tears down even when restore fails.
Authorization
access-token In: header
Path Parameters
Query Parameters
Response Body
curl -X DELETE "https://example.com/sfp/api/mocks/workspaces/string?restore=string&force=string"/sfp/api/mocks/workspaces/{workspace}/services/{service}/rulesAuthorization
access-token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PUT "https://example.com/sfp/api/mocks/workspaces/string/services/string/rules" \ -H "Content-Type: application/json" \ -d '{ "rules": [ { "request": { "method": "string", "path": "string" } } ] }'/sfp/api/mocks/workspaces/{workspace}/services/{service}/rulesAuthorization
access-token In: header
Path Parameters
Response Body
curl -X DELETE "https://example.com/sfp/api/mocks/workspaces/string/services/string/rules"/sfp/api/mocks/workspaces/{workspace}/requestsAuthorization
access-token In: header
Path Parameters
Query Parameters
Response Body
curl -X GET "https://example.com/sfp/api/mocks/workspaces/string/requests?service=string&since=string&limit=string"/sfp/api/mocks/workspaces/{workspace}/services/{service}/rules.yamlAuthorization
access-token In: header
Path Parameters
Response Body
curl -X GET "https://example.com/sfp/api/mocks/workspaces/string/services/string/rules.yaml"/sfp/api/mocks/workspaces/{workspace}/switch-stateCalled after the org-side switch so restore works from anywhere — first recorded original endpoint wins.
Authorization
access-token In: header
Path Parameters
Response Body
curl -X POST "https://example.com/sfp/api/mocks/workspaces/string/switch-state"/sfp/api/mocks/workspaces/{workspace}/restoreResolves review-environment auth from the workspace context; force continues past per-credential failures.
Authorization
access-token In: header
Path Parameters
Response Body
curl -X POST "https://example.com/sfp/api/mocks/workspaces/string/restore"