Link: https://support.brilliantdirectories.com/support/solutions/articles/12000103396
The API allows getting, creating, updating, deleting, rendering, and posting widgets on the website. However, only one widget can be updated at a time.
Available API Endpoints
https://example.com/api/v2/data_widgets/get/{id}
https://example.com/api/v2/data_widgets/create
https://example.com/api/v2/data_widgets/update
https://example.com/api/v2/data_widgets/delete
https://example.com/api/v2/data_widgets/render
Using the API, the following actions can be performed:
Get a Widget
Read the data of a single widget based on the widget_id.
Endpoint:
Example Request:
Query Parameters:
property | The property key (eg., widget_id). |
property_value | The value associated with the property. |
Example Response:
Create a Widget
Add a new widget to the database.
Parameter Notes: The widget_id will be assigned by the system.
Endpoint:
Example Request:
Query Parameters:
widget_name | The name of the widget. |
widget_data | HTML + PHP. |
widget_style | CSS. |
widget_javascript | JS. |
Example Response:
Update a Widget
Update a widget record and their related data from the database.
Parameter Notes: Use widget_id or widget_name.
Endpoint:
Example Request:
Query Parameters:
widget_id | The ID of the widget. |
widget_name | The name of the widget. |
widget_data | HTML + PHP. |
widget_style | CSS. |
widget_javascript | JS. |
Example Response:
Delete a Widget
Delete a widget and their related data from the database.
Parameter Notes: Use widget_id or widget_name.
Endpoint:
Example Request:
Query Parameters:
widget_id | The ID of the widget. |
widget_name | The name of the widget. |
Example Response:
Render a Widget
Render widget content of specific widget.
Parameter Notes: Use widget_id or widget_name. The widget needs to be customized to get the widget output.
Endpoint:
Example Request:
Query Parameters:
widget_id | The ID of the widget. |
widget_name | The name of the widget. |
Example Response: