For the complete documentation index, see llms.txt. This page is also available as Markdown.

Widgets

APIs for managing widgets

Get widgets

post

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.

Header parameters
AuthorizationstringRequired

{api_key}

x-xdr-auth-idstringRequired

{api_key_id}

Body
Responses
200

OK

application/json
objects_countintegerOptional

Number of widgets returned.

objects_typestringOptional
post/public_api/v1/widgets/get
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"
}

Insert or update widgets

post

Update or add the widgets retrieved by the Get widgets API.

You must have Instance Administrator permissions to run this endpoint.

Header parameters
AuthorizationstringRequired

{api_key}

x-xdr-auth-idstringRequired

{api_key_id}

Body
Responses
200

OK

application/json
post/public_api/v1/widgets/insert
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"
        }
      ]
    }
  ]
}
200

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 widgets

post

Delete the widgets retrieved by the Get widgets API.

You must have Instance Administrator permissions to run this endpoint.

Header parameters
AuthorizationstringRequired

{api_key}

x-xdr-auth-idstringRequired

{api_key_id}

Body
Responses
200

OK

application/json
objects_countintegerOptional

Number of widgets deleted.

objectsstring[]Optional

List of widget IDs of widgets successfully deleted.

post/public_api/v1/widgets/delete
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?