List available account or zone datasets
client.logs.logExplorer.datasets.available.list(AvailableListParams { account_id, zone_id } params?, RequestOptionsoptions?): SinglePage<AvailableDataset { dataset, object_type, schema, timestamp_field } >
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/available
Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field.
The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
List available account or zone datasets
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const availableDataset of client.logs.logExplorer.datasets.available.list({
account_id: 'account_id',
})) {
console.log(availableDataset.dataset);
}{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"success": true,
"result": [
{
"dataset": "dataset",
"object_type": "account",
"schema": {
"properties": {
"foo": "bar"
},
"required": [
"string"
],
"type": "object"
},
"timestamp_field": "timestamp_field"
}
]
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"success": true,
"result": [
{
"dataset": "dataset",
"object_type": "account",
"schema": {
"properties": {
"foo": "bar"
},
"required": [
"string"
],
"type": "object"
},
"timestamp_field": "timestamp_field"
}
]
}