Search or ask Docker

Get changes on a container’s filesystem

GET /containers/{id}/changes — Docker Engine API 1.57.

View Markdown
GET/containers/{id}/changes

Returns which files in a container's filesystem have been added, deleted, or modified. The Kind of modification can be one of:

  • 0: Modified ("C")
  • 1: Added ("A")
  • 2: Deleted ("D")

Connection and access

API connection and authentication guidance

/v1.57

No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.

Parameters

id path Required

ID or name of the container

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Response 200

The list of changes

application/json

Type: array

Array item

Schema: FilesystemChange

All schema constraints and annotations
{
  "items": {
    "$ref": "#/components/schemas/FilesystemChange"
  },
  "type": "array"
}

Example

[
  {
    "Kind": 0,
    "Path": "/dev"
  },
  {
    "Kind": 1,
    "Path": "/dev/kmsg"
  },
  {
    "Kind": 1,
    "Path": "/test"
  }
]

Response 404

no such container

application/json

Schema: ErrorResponse

Example

{
  "message": "No such container: c2ada9df5af8"
}

Response 500

server error

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Referenced schemas

#/components/schemas/ErrorResponse

#/components/schemas/FilesystemChange

Complete operation contract
{
  "description": "Returns which files in a container's filesystem have been added, deleted,\nor modified. The `Kind` of modification can be one of:\n\n- `0`: Modified (\"C\")\n- `1`: Added (\"A\")\n- `2`: Deleted (\"D\")\n",
  "operationId": "ContainerChanges",
  "parameters": [
    {
      "description": "ID or name of the container",
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "example": [
            {
              "Kind": 0,
              "Path": "/dev"
            },
            {
              "Kind": 1,
              "Path": "/dev/kmsg"
            },
            {
              "Kind": 1,
              "Path": "/test"
            }
          ],
          "schema": {
            "items": {
              "$ref": "#/components/schemas/FilesystemChange"
            },
            "type": "array"
          }
        }
      },
      "description": "The list of changes"
    },
    "404": {
      "content": {
        "application/json": {
          "example": {
            "message": "No such container: c2ada9df5af8"
          },
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "no such container"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "server error"
    }
  },
  "summary": "Get changes on a container’s filesystem",
  "tags": [
    "Container"
  ]
}