curl --request GET \
--url https://api-dev.narrative.io/datasets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/datasets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/datasets', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://api-dev.narrative.io/datasets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/datasets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"prev_page": null,
"current_page": 1,
"next_page": null,
"total_records": 1,
"total_pages": 1,
"records": [
{
"id": 18923,
"company_id": 382,
"created_at": "2021-06-24T00:54:40.029056Z",
"data_plane": {
"type": "owned",
"id": "c0bed5c2-8af8-4f7a-9787-1ffc3def339b",
"company_id": 382,
"created_at": "2021-06-01T00:00:00Z",
"description": "The company's Snowflake account",
"display_name": "Snowflake (us-west-2)",
"external_id": "snowflake-prod",
"platform": {
"type": "platform_snowflake",
"account_locator": "ab12345",
"account_name": "acme",
"organization_name": "acmeorg",
"region": {
"type": "region_aws",
"id": "us-west-2"
}
},
"status": "active",
"tags": [],
"updated_at": "2021-06-01T00:00:00Z",
"collaborators": {
"participants": {
"type": "all"
},
"manage_compute_pools": {
"type": "all"
}
},
"compute_pools": []
},
"display_name": "Declared Age",
"is_narrative_managed": true,
"description": "Mobile identifiers tied to birth information provided as part of app registration.",
"name": "Declared Age",
"retention_policy": {
"policies": [
{
"type": {
"kind": "snapshot_ttl",
"snapshot_retention_policy": {
"type": "retain_everything"
}
},
"enabled": true
}
]
},
"schema": {
"file_config": {
"type": "flat",
"delimiter": ",",
"escape": "\"",
"header": true,
"quote": "\""
},
"type": "object",
"properties": {
"idValue": {
"display_name": "Id Value",
"order": 0,
"approximate_cardinality": 100000,
"description": "ID values",
"type": "string"
},
"idType": {
"display_name": "Id Type",
"order": 1,
"approximate_cardinality": 1,
"type": "string",
"enum": [
"md5_email",
"sha256_email"
]
},
"eventTimestamp": {
"display_name": "Event TS",
"order": 2,
"description": "When the observation was collected",
"type": "timestamptz",
"validations": [
"eventTimestamp < current_timestamp()"
]
},
"countryCode": {
"display_name": "countryCode",
"order": 3,
"approximate_cardinality": 6,
"description": "The country of residence of the individual",
"type": "string"
},
"age": {
"display_name": "Age",
"order": 4,
"approximate_cardinality": 90,
"description": "How old this individual is in years",
"type": "long"
},
"birthInfo": {
"display_name": "birth info",
"order": 5,
"description": "The year this individual was born",
"type": "double"
}
},
"required": [
"idValue",
"idType",
"eventTimestamp",
"countryCode",
"age"
],
"primary": "/age"
},
"status": "active",
"tags": [
"age",
"demo",
"demographic",
"demographics"
],
"updated_at": "2021-06-24T00:54:40.029056Z",
"write_mode": "append",
"subscription_id": "123e4567-e89b-12d3-a456-426614174000"
}
]
}Get datasets
Return the active and pending datasets belonging to the authenticated company, one page at a time.
Without page and per_page every dataset comes back in a single page. With either one the list is
paged, per_page defaulting to 100.
A data_plane_id, page or per_page value that does not parse makes the request answer 404 with no
body rather than 400. A tag value that is not a valid tag is not an error: the request is served as if
no tag had been sent at all.
curl --request GET \
--url https://api-dev.narrative.io/datasets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/datasets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/datasets', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://api-dev.narrative.io/datasets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/datasets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"prev_page": null,
"current_page": 1,
"next_page": null,
"total_records": 1,
"total_pages": 1,
"records": [
{
"id": 18923,
"company_id": 382,
"created_at": "2021-06-24T00:54:40.029056Z",
"data_plane": {
"type": "owned",
"id": "c0bed5c2-8af8-4f7a-9787-1ffc3def339b",
"company_id": 382,
"created_at": "2021-06-01T00:00:00Z",
"description": "The company's Snowflake account",
"display_name": "Snowflake (us-west-2)",
"external_id": "snowflake-prod",
"platform": {
"type": "platform_snowflake",
"account_locator": "ab12345",
"account_name": "acme",
"organization_name": "acmeorg",
"region": {
"type": "region_aws",
"id": "us-west-2"
}
},
"status": "active",
"tags": [],
"updated_at": "2021-06-01T00:00:00Z",
"collaborators": {
"participants": {
"type": "all"
},
"manage_compute_pools": {
"type": "all"
}
},
"compute_pools": []
},
"display_name": "Declared Age",
"is_narrative_managed": true,
"description": "Mobile identifiers tied to birth information provided as part of app registration.",
"name": "Declared Age",
"retention_policy": {
"policies": [
{
"type": {
"kind": "snapshot_ttl",
"snapshot_retention_policy": {
"type": "retain_everything"
}
},
"enabled": true
}
]
},
"schema": {
"file_config": {
"type": "flat",
"delimiter": ",",
"escape": "\"",
"header": true,
"quote": "\""
},
"type": "object",
"properties": {
"idValue": {
"display_name": "Id Value",
"order": 0,
"approximate_cardinality": 100000,
"description": "ID values",
"type": "string"
},
"idType": {
"display_name": "Id Type",
"order": 1,
"approximate_cardinality": 1,
"type": "string",
"enum": [
"md5_email",
"sha256_email"
]
},
"eventTimestamp": {
"display_name": "Event TS",
"order": 2,
"description": "When the observation was collected",
"type": "timestamptz",
"validations": [
"eventTimestamp < current_timestamp()"
]
},
"countryCode": {
"display_name": "countryCode",
"order": 3,
"approximate_cardinality": 6,
"description": "The country of residence of the individual",
"type": "string"
},
"age": {
"display_name": "Age",
"order": 4,
"approximate_cardinality": 90,
"description": "How old this individual is in years",
"type": "long"
},
"birthInfo": {
"display_name": "birth info",
"order": 5,
"description": "The year this individual was born",
"type": "double"
}
},
"required": [
"idValue",
"idType",
"eventTimestamp",
"countryCode",
"age"
],
"primary": "/age"
},
"status": "active",
"tags": [
"age",
"demo",
"demographic",
"demographics"
],
"updated_at": "2021-06-24T00:54:40.029056Z",
"write_mode": "append",
"subscription_id": "123e4567-e89b-12d3-a456-426614174000"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of page. Starts from the first (1) page.
Number of records to return.
Free-text keyword query matched against dataset name.
Narrow results to datasets on this data plane.
Filter to datasets carrying this tag. When supplied multiple times, only datasets carrying every supplied tag are returned (all-of semantics).
Response
OK
The number of requested page.
1
Total amount of accessible Access Rules
15000
Total amount of pages.
10
Show child attributes
Show child attributes
The number of the previous page, or null on the first page. Can also refer to the latest existing page if a page beyond the last one was requested.
1
The number of the next page, or null on the last page.
42
Was this page helpful?

