Storyden
Plugins

Plugin Update Package

Replace the package archive for a supervised plugin installation. The uploaded package manifest must have the same plugin ID as the currently installed plugin. If the plugin is active, it is restarted using the new package. If inactive, the package is replaced without changing active state.

PATCH
/plugins/{plugin_instance_id}/package

Replace the package archive for a supervised plugin installation.

The uploaded package manifest must have the same plugin ID as the currently installed plugin. If the plugin is active, it is restarted using the new package. If inactive, the package is replaced without changing active state.

Authorization

cookiestoryden-session<token>

Path Parameters

plugin_instance_id*string

Plugin ID.

Formatxid

Request Body

body?fileapplication/zip
Formatbinary

Response Body

OK

application/json
  1. response
id*Identifier

A unique identifier for this resource.

Formatxid
added_at*string

The time the plugin was installed.

Formatdate-time
name*PluginName

The name of the plugin, as defined in the plugin's manifest. This is not a unique identifier and is only used for display purposes.

description?PluginDescription

The description of the plugin, as defined in the plugin's manifest.

version?PluginVersion

The version of the plugin, as defined in the plugin's manifest. This is not used for any versioning or compatibility purposes by the runtime and is only used for display purposes currently.

status*|||||
manifest*

The plugin's manifest information read from the plugin itself. This describes the version information, the author, its requested access and other information that the plugin has provided.

This data structure is direct from the plugin itself and is not modified by the runtime. As such, it's not part of the Storyden HTTP API contract so it's left as a free-form object here so that HTTP clients don't rely on its structure here. That being said, the manifest format is defined in a contract as part of the Plugin RPC spec which is a separate spec.

As a HTTP API consumer, you probably won't need to interact with this in such a way that requires validation, however if you do need the schema, it is located in plugin.yaml in the same folder as this specification.

connection*|
Example Request
curl -X PATCH 'https://example.com/api/plugins/string/package' \  -H 'Content-Type: application/zip' \  -d 'string'
Example Response
{  "id": "string",  "added_at": "2019-08-24T14:15:22Z",  "name": "string",  "description": "string",  "version": "string",  "status": {    "active_state": "inactive",    "deactivated_at": "2019-08-24T14:15:22Z"  },  "manifest": {},  "connection": {    "mode": "supervised"  }}