> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsiam-api/cortex-platform/xql-user-datasets.md).

# XQL User Datasets

APIs for managing XQL user datasets.

## Define an XQL user dataset

> Define an XQL user dataset based on an existing BigQuery table created by the user.> \\
>
> \
> \*\*Note:\*\* BigQuery table must be an existing table under public\_access\_user.> \\
>
> \
> Required license: \*\*Cortex XSIAM Premium\*\* or \*\*Cortex XSIAM Enterprise\*\* or \*\*Cortex XSIAM NG SIEM\*\*> \\
>
> \
> These APIs are only applicable from within the XSIAM Notebook environment.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XSIAM Platform APIs","version":"Cortex XSIAM 3.6"},"tags":[{"name":"XQL user datasets","description":"APIs for managing XQL user datasets."}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/dataset/define_dataset":{"post":{"tags":["XQL user datasets"],"summary":"Define an XQL user dataset","description":"Define an XQL user dataset based on an existing BigQuery table created by the user.\r\n\r\n**Note:** BigQuery table must be an existing table under public_access_user.\r\n\r\nRequired license: **Cortex XSIAM Premium** or **Cortex XSIAM Enterprise** or **Cortex XSIAM NG SIEM**\r\n\r\nThese APIs are only applicable from within the XSIAM Notebook environment.","operationId":"post-public_api-v1-dataset-define_dataset","parameters":[{"name":"Authorization","in":"header","description":"{api_key}","required":true,"schema":{"type":"string"}},{"name":"x-xdr-auth-id","in":"header","description":"{api_key_id}","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_data":{"type":"object","properties":{"table_name":{"type":"string","description":"An existing BigQuery table name that was created by the user."}},"required":["table_name"]}}}}}},"responses":{"200":{"description":"OK"}}}}}}
```

## Get created XQL user datasets

> Retrieve a list of all XQL user datasets created using the Cortex SDK.> \\
>
> \
> Required license: \*\*Cortex XSIAM Premium\*\* or \*\*Cortex XSIAM Enterprise\*\* or \*\*Cortex XSIAM NG SIEM\*\*> \\
>
> \
> These APIs are only applicable from within the XSIAM Notebook environment.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XSIAM Platform APIs","version":"Cortex XSIAM 3.6"},"tags":[{"name":"XQL user datasets","description":"APIs for managing XQL user datasets."}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/dataset/get_created_datasets":{"post":{"tags":["XQL user datasets"],"summary":"Get created XQL user datasets","description":"Retrieve a list of all XQL user datasets created using the Cortex SDK.\r\n\r\nRequired license: **Cortex XSIAM Premium** or **Cortex XSIAM Enterprise** or **Cortex XSIAM NG SIEM**\r\n\r\nThese APIs are only applicable from within the XSIAM Notebook environment.","operationId":"post-public_api-v1-dataset-get_created_datasets","parameters":[{"name":"Authorization","in":"header","description":"{api_key}","required":true,"schema":{"type":"string"}},{"name":"x-xdr-auth-id","in":"header","description":"{api_key_id}","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"datasets":{"type":"array","description":"A list of created datasets.","items":{"type":"string"}}}}}}}}}}}}
```

## Delete an XQL user dataset

> Delete an XQL user dataset that was created by the Cortex SDK.> \\
>
> \
> Required license: \*\*Cortex XSIAM Premium\*\* or \*\*Cortex XSIAM Enterprise\*\* or \*\*Cortex XSIAM NG SIEM\*\*> \\
>
> \
> These APIs are only applicable from within the XSIAM Notebook environment.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XSIAM Platform APIs","version":"Cortex XSIAM 3.6"},"tags":[{"name":"XQL user datasets","description":"APIs for managing XQL user datasets."}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/dataset/delete_dataset":{"post":{"tags":["XQL user datasets"],"summary":"Delete an XQL user dataset","description":"Delete an XQL user dataset that was created by the Cortex SDK.\r\n\r\nRequired license: **Cortex XSIAM Premium** or **Cortex XSIAM Enterprise** or **Cortex XSIAM NG SIEM**\r\n\r\nThese APIs are only applicable from within the XSIAM Notebook environment.","operationId":"post-public_api-v1-dataset-delete_dataset","parameters":[{"name":"Authorization","in":"header","description":"{api_key}","required":true,"schema":{"type":"string"}},{"name":"x-xdr-auth-id","in":"header","description":"{api_key_id}","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_data":{"type":"object","properties":{"dataset_name":{"type":"string","description":"The dataset name to be deleted."},"delete_underlying_bq_table":{"type":"boolean","description":"Define whether or not to delete the BigQuery table related to the dataset.","default":false}},"required":["dataset_name"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsiam-api/cortex-platform/xql-user-datasets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
