# Insert

## Parameters

| Key          | Type                     |
| ------------ | ------------------------ |
| **REQUIRED** |                          |
| collection   | String (Collection Name) |
| upload       | String (Upload Name)     |
| rows         | Array of data rows       |

## Example

The example below inserts rows to "Upload 1" in the collection "Collection 1".

```
curl -X POST \
  v1/data/insert\
  -H 'Authorization: Basic <Your Base64 Encoded Token>'\
  -d '{
    "collection" : "Collection 1",
    "upload"     : "Upload 1",
    "rows"       : [
        ["0001","2020-11-30",1,50],
        ["0002","2020-11-30",2,70]
    ]
}'
```

## Success Response

The response returns current information on the collection. The stats property will detail how many uploads are in the collection, rows inserted, and what size the sum of the data is.

```
{
    "status": "success",
    "data": {
        "collection": "My Collection",
        "upload": "Upload 1",
        "warnings": 0,
        "messages": [],
        "stats": {
            "uploads": 1,
            "size": 476,
            "inserts": 2
        }
    },
    "hash": "087c91c99b93c46e8b286e83cce61c70",
    "response_time": 0.6148860454559326
}
```

## Success Response With Warnings

If there are any issues with the row parameters, the response will contain a number of warnings along with an array of messages detailing the warnings.

```
{
    "status": "success",
    "data": {
        "collection": "My Collection",
        "upload": "Upload 1",
        "warnings": 1,
        "messages": [
            {
                "parameter": "rows",
                "index": 2,
                "error": "Row did not have a valid data paramater."
            }
        ],
        "stats": {
            "uploads": 1,
            "size": 694,
            "inserts": 2
        }
    },
    "hash": "66837665b6128ea5c6c230d0469836fb",
    "response_time": 0.5959510803222656
}
```


---

# 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://everyday-digital.gitbook.io/falkor-dev-docs/data/insert.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.
