Widgets
APIs for managing widgets
Get widget details by filtering based on the widget title and widget creator.
Note: The endpoint only returns XQL widgets and not predefined widgets.
You must have Instance Administrator permissions to run this endpoint.
{api_key}
{api_key_id}
OK
Number of widgets returned.
Invalid field or operator.
POST /public_api/v1/widgets/get HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 141
{
"request_data": {
"filters": [
{
"field": "title",
"value": "Widget A",
"operator": "EQ"
},
{
"field": "created_by",
"value": "John Doe",
"operator": "EQ"
}
]
}
}{
"objects_count": 2,
"objects": [
{
"widgets_data": [
{
"widget_key": "xql_1646052681403",
"title": "Widget A",
"creation_time": 1653303166334,
"description": null,
"data": {
"phrase": "cold_dataset = endpoints",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "table",
"commands": []
}
},
"support_time_range": true,
"additional_info": {
"query_tables": [
"endpoints"
],
"query_uses_library": false
},
"creator_mail": "user@company.com"
}
]
},
{
"widgets_data": [
{
"widget_key": "xql_1346826725701",
"title": "Widget B",
"creation_time": 1653302483610,
"description": null,
"data": {
"phrase": "dataset = endpoints ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "table",
"commands": []
},
"gridRawStorageInfo": {
"sort": null,
"coldefs": {},
"rowHeight": "{\"rowHeight\":\"regular\",\"gridRowsHeight\":\"medium-row\"}",
"columnWidth": null
}
},
"support_time_range": true,
"additional_info": {
"query_tables": [
"endpoints"
],
"query_uses_library": false
},
"creator_mail": "user@company.com"
}
]
}
],
"objects_type": "widgets"
}Update or add the widgets retrieved by the Get widgets API.
You must have Instance Administrator permissions to run this endpoint.
{api_key}
{api_key_id}
OK
POST /public_api/v1/widgets/insert HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 931
{
"request_data": [
{
"widgets_data": [
{
"widget_key": "xql_1646052681403",
"title": "Widget A",
"creation_time": 1653303166334,
"description": null,
"data": {
"phrase": "cold_dataset = endpoints",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "table",
"commands": []
}
},
"support_time_range": true,
"additional_info": {
"query_tables": [
"endpoints"
],
"query_uses_library": false
},
"creator_mail": "user@company.com"
}
]
},
{
"widgets_data": [
{
"widget_key": "xql_1346826725701",
"title": "Widget B",
"creation_time": 1653302483610,
"description": null,
"data": {
"phrase": "dataset = endpoints ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "table",
"commands": []
},
"gridRawStorageInfo": {
"sort": null,
"coldefs": {},
"rowHeight": "{\"rowHeight\":\"regular\",\"gridRowsHeight\":\"medium-row\"}",
"columnWidth": null
}
},
"support_time_range": true,
"additional_info": {
"query_tables": [
"endpoints"
],
"query_uses_library": false
},
"creator_mail": "user@company.com"
}
]
}
]
}OK
{
"added_objects": [
{
"key": "xql_1626053781409",
"title": "Widget 1"
}
],
"updated_objects": [
{
"key": "xql_1636815725608",
"title": "Widget 45"
}
],
"errors": [
{
"key": "xql_1651607948383",
"error": "Failed importing widget"
}
]
}Delete the widgets retrieved by the Get widgets API.
You must have Instance Administrator permissions to run this endpoint.
{api_key}
{api_key_id}
OK
Number of widgets deleted.
List of widget IDs of widgets successfully deleted.
Invalid field or operator.
POST /public_api/v1/widgets/delete HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 141
{
"request_data": {
"filters": [
{
"field": "title",
"value": "Widget A",
"operator": "EQ"
},
{
"field": "created_by",
"value": "John Doe",
"operator": "EQ"
}
]
}
}{
"objects_count": 3,
"objects": [
"xql_1656052681401",
"xql_1636816727601",
"xql_1653607348382"
]
}Last updated
Was this helpful?
