Runtime configuration for the admin client.
Returns a runtime config object.
{
"preFlight": {
"env": "development",
"port": 3100,
"target": "https://jsonplaceholder.typicode.com"
},
"fakes": [
"example"
],
"strict": false,
"recording": true,
"active": true,
"dump": true,
"sleep": 0,
"retryLockTimeout": 0,
"disabledProjects": [ "project-foo" ]
}
Modify runtime config.
Toggle project. Accepts empty payload.
Returns empty body on success.
Projects are containers. You can create "projectfoo" by calling
pied piper proxy through http://pied-piper.dev:3100/project-foo/proxy.
Project names may contain alphanumeric characters and underscores only.
Returns a list of project names.
["foo", "bar", "baz"]
Delete project by name, destroy collection in database.
Returns empty body on success.
Proxied resources are the responses recorded in the db.
They may be retrieved, modified or deleted.
Get a list of resources. Response is an array of proxied resource objects.
Flush all items. Returns empty body on success.
Server side events (SSE). Streaming endpoint.
Gets a new proxied resource object.
Disabled and sleep are optional, _id is mongo id.
{
"_id": "5895c2d67334cc413176f0ec",
"disabled": true,
"sleep": 3,
"lastModified": "2017-02-04T12:02:30.687Z",
"request": {
"body": { /*...*/ },
"headers": { /*...*/ },
"method": "GET",
"target": "/posts",
"uri": "https://jsonplaceholder.typicode.com/posts"
},
"response": {
"headers": { /*...*/ },
"statusCode": 200,
"body": { /*...*/ }
}
}
Modify a stored resource object. Returns empty body on success.
Deletes resource from db. Returns empty body on success.
Returns empty body on success.
The purpose of the project, transparently proxy calls from
remote endpoint to local client.
The main proxy api endpoint. Anything directed here will be
proxied transparently forward to the env.TARGET url.
Remote payload.