Skip to content

The preview again, or another sheet of the same workbook

GET
/v1/imports/{import_id}
curl --request GET \
--url https://api.supposing.app/v1/imports/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0
import_id
required
Import Id
string format: uuid
sheet
Sheet
Any of:
string

Successful Response

Media typeapplication/json
ImportPreview

A parsed spreadsheet waiting for its mapping. Commit it to make the dataset.

object
id
required
Id
string format: uuid
filename
required
Filename
string
format
required
Format
string
Allowed values: csv xlsx
sheets
required
Sheets

Sheet names for a workbook; empty for CSV.

Array<string>
sheet
required
Sheet
Any of:
string
n_rows
required
N Rows
integer
columns
required
Columns
Array<object>
ImportColumn
object
name
required
Name
string
filled
required
Filled

Share of rows with a value, 0 to 1.

number
avg_chars
required
Avg Chars
integer
max_chars
required
Max Chars
integer
unique
required
Unique

Every row has a different, non-empty value.

boolean
distinct
required
Distinct

How many different non-empty values.

integer
personal
required
Personal

Looks personal or identifying (name, email, date…): hide it from the judge.

boolean
samples
required
Samples
Array<string>
rows
required
Rows

The first rows, cells cut to 300 characters.

Array<Array<string>>
mapping
required
ImportMapping

Our guess: personal and date columns go to metadata.

object
id_field
required
Id Field

Your ID for each row (kept as source_id).

Any of:
string
title_field
required
Title Field

The title people see. Defaults to id_field.

Any of:
string
text_fields
required
Text Fields

What the judge reads, in order; with more than one, each is under a ‘## ’ heading.

Array<string>
metadata_fields
required
Metadata Fields

Kept for people, never shown to the judge.

Array<string>
warnings
required
Warnings
Array<string>

Example

{
"format": "csv"
}

Client error. Branch on code; show message and hint.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
]
}

Server error.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
]
}