Plugin Records
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108138
← Back to API Reference | Getting Started
Plugin Records
Plugin Records define the installed addon modules on a directory site. Each record identifies a plugin by a machine-readable variable name and a human-friendly nickname, tracks whether it is currently active, and stores an optional admin panel link URL. Plugin records are used by the admin role permissions system to control which plugins sub-administrators can access.
plugin_records — DB table: plugin_recordsThe Plugin Record Object
| Field | Type | Description |
|---|---|---|
plugin_record_id | integer | Unique plugin record ID (primary key, read-only) |
active | integer | Whether this plugin is currently active on the site; 1 = active, 0 = inactive required on create |
variable_name | string | Machine-readable unique identifier for this plugin (EG events_plugin, jobs_board); max 80 characters; must be unique required on create |
nick_name | string | Human-readable display name for this plugin (EG Events Plugin, Jobs Board); max 80 characters required on create |
link_url | string | Relative URL to this plugin's admin panel page (EG /admin/plugins/events); max 100 characters |
List Plugin Records
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/plugin_records/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"plugin_record_id": "1",
"active": "1",
"variable_name": "events_plugin",
"nick_name": "Events Plugin",
"link_url": "/admin/plugins/events"
},
{
"plugin_record_id": "2",
"active": "0",
"variable_name": "jobs_board",
"nick_name": "Jobs Board",
"link_url": "/admin/plugins/jobs"
}
],
"total": "2",
"current_page": 1,
"total_pages": 1
}Retrieve a Plugin Record
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/plugin_records/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"plugin_record_id": "1",
"active": "1",
"variable_name": "events_plugin",
"nick_name": "Events Plugin",
"link_url": "/admin/plugins/events"
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Plugin Record
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/plugin_records/create" \ -H "X-Api-Key: your-api-key-here" \ -d "active=1" \ -d "variable_name=booking_plugin" \ -d "nick_name=Booking+Plugin" \ -d "link_url=/admin/plugins/booking"
Example Response
{
"status": "success",
"message": {
"plugin_record_id": "3",
"active": "1",
"variable_name": "booking_plugin",
"nick_name": "Booking Plugin",
"link_url": "/admin/plugins/booking"
}
}Update a Plugin Record
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/plugin_records/update" \ -H "X-Api-Key: your-api-key-here" \ -d "plugin_record_id=3" \ -d "active=0" \ -d "nick_name=Booking+Plugin+%28Disabled%29"
Example Response
{
"status": "success",
"message": {
"plugin_record_id": "3",
"active": "0",
"variable_name": "booking_plugin",
"nick_name": "Booking Plugin (Disabled)",
"link_url": "/admin/plugins/booking"
}
}Delete a Plugin Record
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/plugin_records/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "plugin_record_id=3"
Example Response
{
"status": "success",
"message": "plugin_records record was deleted"
}