# Get information about files in a container


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





`HEAD /containers/{id}/archive`

A response header `X-Docker-Container-Path-Stat` is returned, containing
a base64 - encoded JSON object with some filesystem header information
about the path.


## Connection and access

[API connection and authentication guidance](/reference/api/engine/version/v1.57/#connection)


Server: `/v1.57`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
null
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --head \
  --unix-socket "${DOCKER_SOCKET:-/var/run/docker.sock}" \
  --header 'Accept: application/x-tar' \
  'http://localhost/v1.57/containers/<ID>/archive?path=%3CPATH%3E'
```



## Parameters

### id

Location: path. Required: yes.

ID or name of the container

```json
{
  "description": "ID or name of the container",
  "in": "path",
  "name": "id",
  "pointer": "/paths/~1containers~1{id}~1archive/head/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### path

Location: query. Required: yes.

Resource in the container’s filesystem to archive.

```json
{
  "description": "Resource in the container’s filesystem to archive.",
  "in": "query",
  "name": "path",
  "pointer": "/paths/~1containers~1{id}~1archive/head/parameters/1",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 

no error

No response content is declared.




Headers:

```json
{
  "X-Docker-Container-Path-Stat": {
    "description": "A base64 - encoded JSON object with some filesystem header\ninformation about the path\n",
    "schema": {
      "type": "string"
    }
  }
}
```








### Response 400 application/json

Bad parameter


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


### Response 404 application/json

Container or path does not exist


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Example:
```json
{
  "message": "No such container: c2ada9df5af8"
}
```


### Response 500 application/json

Server error


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


## Complete operation contract

```json
{
  "description": "A response header `X-Docker-Container-Path-Stat` is returned, containing\na base64 - encoded JSON object with some filesystem header information\nabout the path.\n",
  "operationId": "ContainerArchiveInfo",
  "parameters": [
    {
      "description": "ID or name of the container",
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Resource in the container’s filesystem to archive.",
      "in": "query",
      "name": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "no error",
      "headers": {
        "X-Docker-Container-Path-Stat": {
          "description": "A base64 - encoded JSON object with some filesystem header\ninformation about the path\n",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Bad parameter"
    },
    "404": {
      "content": {
        "application/json": {
          "example": {
            "message": "No such container: c2ada9df5af8"
          },
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Container or path does not exist"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Server error"
    }
  },
  "summary": "Get information about files in a container",
  "tags": [
    "Container"
  ]
}
```

## Referenced schemas

- [#/components/schemas/ErrorResponse](/reference/api/engine/version/v1.57/schemas/ErrorResponse/)




