Content Management API > Plugin
Update a plugin
Body parameters
type string Required
Must be exactly "plugin".
attributes.name string Optional
The name of the plugin
Example:
"5 stars"
attributes.description null, string Optional
A description of the plugin
Example:
"A better rating experience!"
attributes.url string Optional
The entry point URL of the plugin
Example:
"https://cdn.rawgit.com/datocms/extensions/master/samples/five-stars/extension.ts"
attributes.parameters object Optional
Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later.
Example:
{ devMode: true }
attributes.package_version null, string Optional
The installed version of the plugin (or null if it's a private plugin)
Example:
"0.0.4"
attributes.permissions Optional
Permissions granted to this plugin
Type:
Array<string>
Returns
Returns a resource object of type plugin.
Examples
PUT https://site-api.datocms.com/plugins/:plugin_id HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "plugin", "id": "RMAMRffBRlmBuDlQsIWZ0g", "attributes": {} }}curl -g 'https://site-api.datocms.com/plugins/:plugin_id' \ -X PUT \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"type":"plugin","id":"RMAMRffBRlmBuDlQsIWZ0g","attributes":{}}}'await fetch("https://site-api.datocms.com/plugins/:plugin_id", { method: "PUT", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { type: "plugin", id: "RMAMRffBRlmBuDlQsIWZ0g", attributes: {} }, }),});HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "plugin", "id": "RMAMRffBRlmBuDlQsIWZ0g", "attributes": { "name": "5 stars", "description": "A better rating experience!", "url": "https://cdn.rawgit.com/datocms/extensions/master/samples/five-stars/extension.ts", "parameters": { "devMode": true }, "package_name": "datocms-plugin-star-rating-editor", "package_version": "0.0.4", "permissions": [ "currentUserAccessToken" ] }, "meta": { "version": "2" } }}