# Upload

## List

```javascript
{
    "kind": "upload",
    "uri": string,
    "url": string,
    "name": string,
    "status": string("queued","running","completed","failed"),
    "hash": string,
    "size": integer,
    "numRows": integer,
    "numBytes": integer,
}
```

## Get

In addition to the base definition, any upload resource returned by a `get` request will contain the following properties:

```javascript
{
    "type": string,
    "hasHeaderRow": bool,
    "delimiter": string,
    "quoteCharacter": string,
    "escapeCharacter": string,
    "skipBadRecords": bool,
    "badRecordsCount": integer,
    "hasQuotedNewlines": bool,
    "nullMarkers": str[],
    "errorMessage": string
}
```

## Documentation

| field             |                                                                                                                                                                                                                                                                                                                                                                                   |        |     |      |     |          |                  |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | --- | ---- | --- | -------- | ---------------- |
| **List**          |                                                                                                                                                                                                                                                                                                                                                                                   |        |     |      |     |          |                  |
| kind              | <p><strong>string</strong></p><p>The resource type. Will always be "variable".</p>                                                                                                                                                                                                                                                                                                |        |     |      |     |          |                  |
| uri               | <p><strong>string</strong></p><p>The fully qualified reference to this upload, for use in generating calls to this API. </p><p>For example, <code>/tables/imathews.example:123.test:456/uploads/789</code></p>                                                                                                                                                                    |        |     |      |     |          |                  |
| url               | <p><strong>string</strong></p><p>The qualified URL to the upload</p>                                                                                                                                                                                                                                                                                                              |        |     |      |     |          |                  |
| name              | <p><strong>string</strong></p><p>The name of the file. Defaults to <code>untitled\_upload.{type}</code></p>                                                                                                                                                                                                                                                                       |        |     |      |     |          |                  |
| status            | <p><strong>string</strong></p><p>The current import status of the upload. Will be one of <code>"queued", "running", "completed", "failed"</code></p>                                                                                                                                                                                                                              |        |     |      |     |          |                  |
| hash              | <p><strong>string</strong></p><p>The md5 hash of the upload's file content.</p>                                                                                                                                                                                                                                                                                                   |        |     |      |     |          |                  |
| size              | <p><strong>integer</strong></p><p>The size, in bytes, of the uploaded file..</p>                                                                                                                                                                                                                                                                                                  |        |     |      |     |          |                  |
| numRows           | <p><strong>integer</strong></p><p>The number of rows in the uploaded content</p>                                                                                                                                                                                                                                                                                                  |        |     |      |     |          |                  |
| numBytes          | <p><strong>integer</strong></p><p>The number of bytes stored in Redivis's tabular representation of the upload. This will likely be different than <code>size</code>, which reflects the number of bytes in the file that was uploaded.</p>                                                                                                                                       |        |     |      |     |          |                  |
| **Get**           |                                                                                                                                                                                                                                                                                                                                                                                   |        |     |      |     |          |                  |
| type              | <p><strong>string</strong></p><p>The type of file being uploaded. Will be one of: <br></p><ul><li>delimited</li><li>stream </li><li>avro</li><li>jsonl</li><li>parquet</li><li>orc</li><li>xls</li><li>xlsx</li><li>dta</li><li>sas7bdat</li><li>sav</li><li>geojson</li><li>geojsonl</li><li>gdb.zip</li><li>gpkg</li><li>json</li><li>shp</li><li>shp.zip</li><li>kml</li></ul> |        |     |      |     |          |                  |
| hasHeaderRow      | <p><strong>boolean</strong></p><p>Whether the first row contains a list of variable names. Defaults to <code>true</code>. Only relevant for types <code>csv</code>,<code>xls</code>,<code>xlsx</code></p>                                                                                                                                                                         |        |     |      |     |          |                  |
| delimiter         | <p><strong>string</strong></p><p>The delimiter used to separate cells in file. Only relevant for type <code>csv</code>. If <code>null</code> (the default), the delimiter will be auto-computed based on an analysis of a preview of the file.</p>                                                                                                                                |        |     |      |     |          |                  |
| quoteCharacter    | <p><strong>string</strong></p><p>The quote sequence used to escape cells in a <code>csv</code> , not relevant for other types. Defaults to <code>"</code>. In order to escape a quote character, it <em>must</em> be doubled — e.g.:</p><p><code>"She said, ""Hello"""</code></p>                                                                                                 |        |     |      |     |          |                  |
| escapeCharacter   | <p><strong>string</strong><br>The escape characters specifies the character that indicates characters immediately following it should be escaped. Defaults to the <code>quoteCharacter</code> (described above)</p>                                                                                                                                                               |        |     |      |     |          |                  |
| allowJaggedRows   | <p><strong>boolean</strong><br>Whether to allow rows that have more or fewer columns than the header row. Use caution when setting to true, as jagged rows often suggest a parsing issue; ignoring those errors could lead to data corruption.</p>                                                                                                                                |        |     |      |     |          |                  |
| skipBadRecords    | <p><strong>boolean</strong></p><p>Defaults to <code>false</code>. If true, upload will succeed even if some records cannot be parsed.</p>                                                                                                                                                                                                                                         |        |     |      |     |          |                  |
| hasQuotedNewlines | <p><strong>boolean</strong></p><p>Whether  newline characters exist in cells. Only relevant for types <code>csv                                                                                                                                                                                                                                                                   | ndjson | xls | xlsx | dta | sas7bdat | sav</code>. </p> |
| nullMarkers       | <p><strong>string\[]</strong><br>An array of strings corresponding to any values that should instead be interpreted as <code>NULL</code> upon import.</p>                                                                                                                                                                                                                         |        |     |      |     |          |                  |
| errorMessage      | <p><strong>string</strong></p><p>If <code>status == "failed"</code>, will provide additional information about what cause the upload failure.</p>                                                                                                                                                                                                                                 |        |     |      |     |          |                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/resource-definitions/upload.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
