Delete Container
Description
Deletes a container.
Request
Request Header
DELETE /api/containers/<container> HTTP/1.1
Host: <management-APIs URL>
Cookie: session=<cookie>
url = "<management-APIs URL>/api/containers/<container>"
headers = {"Cookie": "session=<cookie>"}
- <container>
The ID of the container to delete.
- Type: Integer
- Requirement: Required
Request Data
None
Response
Response Header
HTTP/1.1 <status code; 200 on success> <reason phrase>
Content-Type: application/json
Response Data
{
"data": {
"attributes": {
"container_id": number,
"job_id": "string"
},
"type": "container_deletion",
"id": 0
}
}
The
Examples
Delete a container with ID 1030:
DELETE /api/containers/1030 HTTP/1.1
Host: https://dashboard.default-tenant.app.mycluster.iguazio.com
Cookie: session=j%3A%7B%22sid%22%3A%20%22a9ce242a-670f-47a8-9c8b-c6730f2794dc%22%7D
import requests
url = "https://dashboard.default-tenant.app.mycluster.iguazio.com/api/containers/1030"
headers = {"Cookie": "session=j%3A%7B%22sid%22%3A%20%22a9ce242a-670f-47a8-9c8b-c6730f2794dc%22%7D"}
response = requests.delete(url, headers=headers)
print(response.text)
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"data": {
"attributes": {
"container_id": 1030,
"job_id": "6e7f9bf5-4a7c-4efb-83b7-31785fa82183"
},
"type": "container_deletion",
"id": 0
}
}