# dag\_import

Imports all blocks present in supplied [Content Address aRchive (CAR) files](https://ipld.io/specs/transport/car/). The command recursively pins the root specified in the `.car` file headers, unless `pin-roots` is set to `false`.

Note: You can't pin multiple DAG roots using this endpoint. For example, if supplying multiple `.car` files in the same request. If you try, you'll receive the `only one dag root can be pinned per request` error.

#### REQUEST <a href="#request" id="request"></a>

```bash
curl "https://ipfs.krypc.io:5001/api/v0/dag/import?pin-roots=false&#x26;allow-big-block=false" \
    -X POST \
    -u "PROJECT_ID:PROJECT_SECRET" \
    -H "Content-Type: multipart/form-data" \
    -F file=@"<file>"
```

**REQUEST PARAMS**[**​**](https://docs.infura.io/networks/ipfs/http-api-methods/dag_import#request-params)

* `file` : *string* - path to the `.car` file.
* `pin-roots:` *boolean* - pin the root listed in the .car headers after importing. The default is `true`. Only one DAG root can be pinned per request.
* `silent` : *boolean -* no output.
* `stats`: *boolean -* output statistics.
* `allow-big-block`: *boolean* - disable the block size check and allow the creation of blocks bigger than 1 MiB. The default is `false`. Bigger blocks won't be transferable over the standard bitswap.

#### RESPONSE[​](https://docs.infura.io/networks/ipfs/http-api-methods/dag_import#response) <a href="#response" id="response"></a>

On success, the call to this endpoint returns a `200` response with the following body:

```
{
  "Root": {
    "Cid": {
      "/": "<cid-string>"
    },
    "PinErrorMsg": "<string>"
  },
  "Stats": {
    "BlockBytesCount": "<uint64>",
    "BlockCount": "<uint64>"
  }
}
```


---

# 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.krypcore.com/dev-docs/api-reference/infrastructure-apis/ipfs-http-client-apis/http-api-methods/dag_import.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.
