Extract an archive of files or folders to a directory in a container Run in API Explorer
Upload a tar archive to be extracted to a path in the filesystem of container id.
path
parameter is asserted to be a directory. If it exists as a file, 400 error
will be returned with message "not a directory".
Query parameters
-
Path to a directory in the container to extract the archive’s contents into.
-
If
1
,true
, orTrue
then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. -
If
1
,true
, then it will copy UID/GID maps to the dest file or dir
application/x-tar
PUT
/containers/{id}/archive
cURL (application/x-tar)
curl \
--request PUT 'http://api.example.com/v1.44/containers/{id}/archive?path=string' \
--header "Content-Type: application/x-tar" \
--data-binary '@file'
curl \
--request PUT 'http://api.example.com/v1.44/containers/{id}/archive?path=string' \
--header "Content-Type: application/octet-stream" \
--data-binary '@file'
Response examples (400)
{
"message": "not a directory"
}
Response examples (400)
{
"message": "Something went wrong."
}
Response examples (403)
{
"message": "Something went wrong."
}
Response examples (403)
{
"message": "Something went wrong."
}
Response examples (404)
{
"message": "No such container: c2ada9df5af8"
}
Response examples (404)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}