Skip to main content
POST
/
v2
/
inference
Infer the dataset schema of a file passed by multipart file.
curl --request POST \
  --url https://api-dev.narrative.io/v2/inference \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "schema": {
    "file_config": {
      "type": "flat",
      "header": true,
      "delimiter": "<string>",
      "quote": "<string>",
      "escape": "<string>"
    },
    "type": "object",
    "properties": {},
    "primary": "<string>",
    "required": [
      "<string>"
    ],
    "unsellable": [
      "<string>"
    ],
    "sensitive": [
      "<string>"
    ]
  }
}

Body

multipart/form-data
file
file

Response

OK

schema
object

Schema describing a dataset's input file type and the kind of data the file contains. Note: when the file type is "flat" then the order of the properties describing the must be given in the order they appear in the input file.