Developer documentation
Request And Collection CRUD
Plugins can create collections, add requests, rename/delete collections, edit the active request, save it, and send requests by ID.
Request fields and bind paths
| Bind path | Reads/writes |
|---|---|
activeRequest.name | The active request name. |
activeRequest.method | HTTP method such as GET, POST, PUT, PATCH, DELETE, HEAD. |
activeRequest.url | The URL input. |
activeRequest.body | The body editor content. |
activeRequest.headers | The active request headers map. |
response.body | The latest response body. |
response.statusCode | The latest response status code. |
pluginData.pluginId.key | A nested plugin data value for plugin-owned UI. |
Edit and send active request
return {
__action: "multi",
actions: [
{
__action: "setFields",
fields: {
"activeRequest.method": "POST",
"activeRequest.url": "https://jsonplaceholder.typicode.com/posts",
"activeRequest.body": JSON.stringify({ title: "Plugin", userId: 1 }, null, 2)
}
},
{ __action: "runCommand", command: "core.request.send" }
]
};
Collection actions
| Action | Fields | Use |
|---|---|---|
collection.create | collection: { id, name } | Create and activate a collection. |
collection.addRequest | collectionId, request | Add a request to a collection, then activate it. |
collection.rename | collectionId, name | Rename a collection. |
collection.delete | collectionId | Delete a collection and choose a fallback active collection. |
return {
__action: "multi",
actions: [
{ __action: "collection.create", collection: { id: "demo", name: "Demo Collection" } },
{
__action: "collection.addRequest",
collectionId: "demo",
request: {
id: "demo-posts",
name: "Posts",
method: "GET",
url: "https://jsonplaceholder.typicode.com/posts/1",
headers: {},
body: ""
}
}
]
};