Historical contract: Edit Plugin
Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.
Historical meaning
Edit Plugin
This API endpoint is used to update a plugin.
Current API
For new integrations, use the linked current API reference or guide.
Parameters
[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "plugin_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]
Request body
{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"root": {
"type": "string"
},
"enabled": {
"type": "boolean"
}
}
}
}
}
}
Responses
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"id\": 1,\n \"name\": \"<redacted-personal>\",\n \"root\": \"https://example.com/\",\n \"key\": \"<redacted-secret>\",\n \"description\": \"Description for Example Ordering\",\n \"author\": \"Ordering Inc\",\n \"url\": \"https://example.com/\",\n \"version\": \"0.0.1\",\n \"enabled\": true,\n \"created_at\": \"2019-01-09 19:16:03\",\n \"updated_at\": \"2019-01-09 19:16:03\",\n \"hooks\": [\n {\n \"id\": 5,\n \"plugin_id\": 1,\n \"type\": 1,\n \"hook\": \"users_register\",\n \"endpoint\": \"/action_users_register.php\"\n },\n {\n \"id\": 6,\n \"plugin_id\": 1,\n \"type\": 1,\n \"hook\": \"users_update\",\n \"endpoint\": \"/action_users_update.php\"\n }\n ]\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"root": {
"type": "string",
"example": "https://example.com/"
},
"key": {
"type": "string",
"example": "<redacted-secret>"
},
"description": {
"type": "string",
"example": "Description for Example Ordering"
},
"author": {
"type": "string",
"example": "Ordering Inc"
},
"url": {
"type": "string",
"example": "https://example.com/"
},
"version": {
"type": "string",
"example": "0.0.1"
},
"enabled": {
"type": "boolean",
"example": true,
"default": true
},
"created_at": {
"type": "string",
"example": "2019-01-09 19:16:03"
},
"updated_at": {
"type": "string",
"example": "2019-01-09 19:16:03"
},
"hooks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 5,
"default": 0
},
"plugin_id": {
"type": "integer",
"example": 1,
"default": 0
},
"type": {
"type": "integer",
"example": 1,
"default": 0
},
"hook": {
"type": "string",
"example": "users_register"
},
"endpoint": {
"type": "string",
"example": "/action_users_register.php"
}
}
}
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"ERROR_PLUGIN_CONFIG\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "ERROR_PLUGIN_CONFIG"
}
}
}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"You do not have permission.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "You do not have permission."
}
}
}
}
}
}
}
}