Skip to main content
DELETE
/
datasets
/
{dataset_id}
/
statistics-configuration
Disable Statistics Configuration
curl --request DELETE \
  --url https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration"

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-dev.narrative.io/datasets/{dataset_id}/statistics-configuration")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dataset_id": 123,
  "version": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": 123,
  "configuration": {
    "defaults": {
      "enabled_stats": [],
      "stat_options": {
        "histogram": {
          "max_bins": 50,
          "overflow": "none"
        }
      }
    },
    "refresh": {
      "trigger": "cron",
      "cron_expression": "<string>"
    },
    "dataset": {
      "scope": {
        "enabled_stats": [],
        "stat_options": {
          "histogram": {
            "max_bins": 50,
            "overflow": "none"
          }
        }
      },
      "fields": [
        {
          "field_name": "<string>",
          "enabled_stats": [],
          "stat_options": {
            "histogram": {
              "max_bins": 50,
              "overflow": "none"
            }
          },
          "self": {
            "enabled_stats": [],
            "stat_options": {
              "histogram": {
                "max_bins": 50,
                "overflow": "none"
              }
            }
          },
          "properties": [
            {
              "path": "<string>",
              "enabled_stats": [],
              "stat_options": {
                "histogram": {
                  "max_bins": 50,
                  "overflow": "none"
                }
              },
              "self": {
                "enabled_stats": [],
                "stat_options": {
                  "histogram": {
                    "max_bins": 50,
                    "overflow": "none"
                  }
                }
              },
              "properties": "<array>",
              "items": {
                "enabled_stats": [],
                "stat_options": {
                  "histogram": {
                    "max_bins": 50,
                    "overflow": "none"
                  }
                },
                "self": {
                  "enabled_stats": [],
                  "stat_options": {
                    "histogram": {
                      "max_bins": 50,
                      "overflow": "none"
                    }
                  }
                },
                "properties": "<array>",
                "items": "<unknown>"
              }
            }
          ],
          "items": {
            "enabled_stats": [],
            "stat_options": {
              "histogram": {
                "max_bins": 50,
                "overflow": "none"
              }
            },
            "self": {
              "enabled_stats": [],
              "stat_options": {
                "histogram": {
                  "max_bins": 50,
                  "overflow": "none"
                }
              }
            },
            "properties": "<array>",
            "items": "<unknown>"
          }
        }
      ]
    },
    "rosetta_stone": {
      "scope": {
        "enabled_stats": [],
        "stat_options": {
          "histogram": {
            "max_bins": 50,
            "overflow": "none"
          }
        }
      },
      "fields": [
        {
          "attribute_name": "<string>",
          "enabled_stats": [],
          "stat_options": {
            "histogram": {
              "max_bins": 50,
              "overflow": "none"
            }
          },
          "self": {
            "enabled_stats": [],
            "stat_options": {
              "histogram": {
                "max_bins": 50,
                "overflow": "none"
              }
            }
          },
          "properties": [
            {
              "path": "<string>",
              "enabled_stats": [],
              "stat_options": {
                "histogram": {
                  "max_bins": 50,
                  "overflow": "none"
                }
              },
              "self": {
                "enabled_stats": [],
                "stat_options": {
                  "histogram": {
                    "max_bins": 50,
                    "overflow": "none"
                  }
                }
              },
              "properties": "<array>",
              "items": {
                "enabled_stats": [],
                "stat_options": {
                  "histogram": {
                    "max_bins": 50,
                    "overflow": "none"
                  }
                },
                "self": {
                  "enabled_stats": [],
                  "stat_options": {
                    "histogram": {
                      "max_bins": 50,
                      "overflow": "none"
                    }
                  }
                },
                "properties": "<array>",
                "items": "<unknown>"
              }
            }
          ],
          "items": {
            "enabled_stats": [],
            "stat_options": {
              "histogram": {
                "max_bins": 50,
                "overflow": "none"
              }
            },
            "self": {
              "enabled_stats": [],
              "stat_options": {
                "histogram": {
                  "max_bins": 50,
                  "overflow": "none"
                }
              }
            },
            "properties": "<array>",
            "items": "<unknown>"
          }
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
integer
required

Unique identifier for a dataset.

Response

200 - application/json

OK

Full statistics configuration entity with metadata. Returned by both PUT (create/update) and GET endpoints.

id
string<uuid>
required

Unique identifier for this configuration version.

dataset_id
integer<int64>
required

The dataset this configuration belongs to.

version
integer<int32>
required

Monotonically increasing version number.

created_at
string<date-time>
required

Timestamp when this configuration version was created.

created_by
integer<int64>
required

User ID of the user who created this configuration version.

configuration
object
required

The full statistics configuration payload.