- 🇯🇵Japan ptmkenny
This support request seems to have been answered. Contributions of additional plugins are always welcome! Please open a new issue to add one.
Hi I want to use this as a consumer of methods to administer Drupal from Javascript and my main focus is available methods.
GET /jsonrpc/methods currently returns a small collection of items. Do you plan to include additional methods in core module or will that be left to contrib modules to expose more plugins to consumers?
Is there a roadmap for a default/minimal set of methods available in the core JSON RPC module?
Is this list a complete set of ALL available JSONRPC plugins or are there easy ways to expose other/any plugins from core and contrib modules to the JSONRPC interface?
Install module
GET https://site.example/jsonrpc/methods returns
Observe: drupal returns a small collection of methods.
{
"data": [
{
"type": "JsonRpcMethod",
"id": "route_builder.rebuild",
"attributes": {
"usage": "Rebuilds the application's router. Result is TRUE if the rebuild succeeded, FALSE otherwise"
},
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods/route_builder.rebuild",
"collection": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
},
{
"type": "JsonRpcMethod",
"id": "user_permissions.add_permission_to_role",
"attributes": {
"usage": "Add the given permission to the specified role.",
"params": {
"permission": {
"type": "JsonRpcParameterDefinition",
"id": "permission",
"attributes": {
"schema": {
"type": "string"
}
},
"schema": {
"type": "string"
}
},
"role": {
"type": "JsonRpcParameterDefinition",
"id": "role",
"attributes": {
"factory": "\\Drupal\\jsonrpc\\ParameterFactory\\EntityParameterFactory"
},
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"uuid": {
"type": "string"
}
}
}
}
}
},
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods/user_permissions.add_permission_to_role",
"collection": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
},
{
"type": "JsonRpcMethod",
"id": "maintenance_mode.isEnabled",
"attributes": {
"usage": "Enables or disables the maintenance mode.",
"params": {
"enabled": {
"type": "JsonRpcParameterDefinition",
"id": "enabled",
"attributes": {
"schema": {
"type": "boolean"
}
},
"schema": {
"type": "boolean"
}
}
}
},
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods/maintenance_mode.isEnabled",
"collection": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
},
{
"type": "JsonRpcMethod",
"id": "user_permissions.list",
"attributes": {
"usage": "List all the permissions available in the site.",
"params": {
"page": {
"type": "JsonRpcParameterDefinition",
"id": "page",
"attributes": {
"factory": "\\Drupal\\jsonrpc\\ParameterFactory\\PaginationParameterFactory"
},
"schema": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 0
},
"offset": {
"type": "integer",
"minimum": 0
}
}
}
}
}
},
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods/user_permissions.list",
"collection": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
},
{
"type": "JsonRpcMethod",
"id": "cache.rebuild",
"attributes": {
"usage": "Rebuilds the system cache."
},
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods/cache.rebuild",
"collection": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
},
{
"type": "JsonRpcMethod",
"id": "plugins.list",
"attributes": {
"usage": "List defined plugins.",
"params": {
"page": {
"type": "JsonRpcParameterDefinition",
"id": "page",
"attributes": {
"factory": "\\Drupal\\jsonrpc\\ParameterFactory\\PaginationParameterFactory"
},
"schema": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 0
},
"offset": {
"type": "integer",
"minimum": 0
}
}
}
},
"service": {
"type": "JsonRpcParameterDefinition",
"id": "service",
"attributes": {
"schema": {
"type": "string"
},
"required": true
},
"schema": {
"type": "string"
}
}
}
},
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods/plugins.list",
"collection": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
}
],
"links": {
"self": "http://drupal894.syntapse.co.uk/jsonrpc/methods"
}
}
Documentation on default set of methods.
Closed: outdated
2.0
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This support request seems to have been answered. Contributions of additional plugins are always welcome! Please open a new issue to add one.