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 pathReads/writes
activeRequest.nameThe active request name.
activeRequest.methodHTTP method such as GET, POST, PUT, PATCH, DELETE, HEAD.
activeRequest.urlThe URL input.
activeRequest.bodyThe body editor content.
activeRequest.headersThe active request headers map.
response.bodyThe latest response body.
response.statusCodeThe latest response status code.
pluginData.pluginId.keyA 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

ActionFieldsUse
collection.createcollection: { id, name }Create and activate a collection.
collection.addRequestcollectionId, requestAdd a request to a collection, then activate it.
collection.renamecollectionId, nameRename a collection.
collection.deletecollectionIdDelete 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: ""
      }
    }
  ]
};