Knowledge Base

API Reference Documentation for Sending a Sample Dataset

Overview

The sample dataset endpoint allows you to upload a representative sample of your dataset to Narrative after dataset registration but before field-to-attribute mapping. This helps validate the dataset structure and ensure it aligns with expected schemas.

For more information on Narrative APIs, visit api.narrative.io.


Endpoint

PUT https://api.narrative.io/datasets/{{dataset_id}}/sample

Headers

HeaderRequiredDescription
AuthorizationYesAPI Key in Bearer format
Content-TypeYesMust be application/json

Request Format

The request body should be an array of JSON objects, where each object represents a sample row that follows the schema structure of the dataset.

Example Request

curl --location --request PUT 'https://api.narrative.io/datasets/{{dataset_id}}/sample' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ****' \
--data '[
    {
        "sha256_hashed_email": {"value": "3a4b1c6d..."},
        "telephone_number": {"value": "+155..."},
        "apple_idfa": {"value": "00000000-...."},
        "postal_address.postal_code": {"value": "10001"}
    },
    {
        "sha256_hashed_email": {"value": "b4c5d6e7f..."},
        "telephone_number": {"value": "+155..."},
        "android_advertising_id": {"value": "00000000-...."},
        "postal_address.postal_code": {"value": "10001"}
    }
]'

Response

Status Code: 200 OK
< Back
Rosetta

Hi! I’m Rosetta, your big data assistant. Ask me anything! If you want to talk to one of our wonderful human team members, let me know! I can schedule a call for you.