Skip to main content
GET
/
datasets
/
{dataset_id}
/
sample
/
mappings
Sampled Mappings
curl --request GET \
  --url https://api-dev.narrative.io/datasets/{dataset_id}/sample/mappings \
  --header 'Authorization: Bearer <token>'
[
  {
    "mapping_id": "62db1e99-7e0e-46c3-802b-1b13a0ebdb7b",
    "records": [
      {
        "input": {
          "idType": "idType1",
          "idValue": "idValue1"
        },
        "output": {
          "unique_id_95b79302_0f80_4cfd_9e43_ea26aa13b9a7": {
            "type": "idType1"
          }
        }
      },
      {
        "input": {
          "idType": "idType2",
          "idValue": "idValue2"
        },
        "output": {
          "unique_id_95b79302_0f80_4cfd_9e43_ea26aa13b9a7": {
            "type": "idType2"
          }
        }
      }
    ]
  },
  {
    "mapping_id": "f2d14fb8-2c9b-4ade-851e-388bfcd942f1",
    "records": [
      {
        "input": {
          "idType": "idType1",
          "idValue": "idValue1"
        },
        "output": {
          "unique_id_322d2d83_d8ec_4808_80be_66d08e446de5": {
            "value": "idValue1"
          }
        }
      },
      {
        "input": {
          "idType": "idType2",
          "idValue": "idValue2"
        },
        "output": {
          "unique_id_322d2d83_d8ec_4808_80be_66d08e446de5": {
            "value": "idValue2"
          }
        }
      }
    ]
  }
]

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.

Query Parameters

size
integer

The number of rows to sample from the dataset.

Required range: x <= 1000

Response

200 - application/json

OK

Example:
[
{
"mapping_id": "62db1e99-7e0e-46c3-802b-1b13a0ebdb7b",
"records": [
{
"input": {
"idType": "idType1",
"idValue": "idValue1"
},
"output": {
"unique_id_95b79302_0f80_4cfd_9e43_ea26aa13b9a7": { "type": "idType1" }
}
},
{
"input": {
"idType": "idType2",
"idValue": "idValue2"
},
"output": {
"unique_id_95b79302_0f80_4cfd_9e43_ea26aa13b9a7": { "type": "idType2" }
}
}
]
},
{
"mapping_id": "f2d14fb8-2c9b-4ade-851e-388bfcd942f1",
"records": [
{
"input": {
"idType": "idType1",
"idValue": "idValue1"
},
"output": {
"unique_id_322d2d83_d8ec_4808_80be_66d08e446de5": { "value": "idValue1" }
}
},
{
"input": {
"idType": "idType2",
"idValue": "idValue2"
},
"output": {
"unique_id_322d2d83_d8ec_4808_80be_66d08e446de5": { "value": "idValue2" }
}
}
]
}
]