List tasks Run in API Explorer
GET
/tasks
curl \
--request GET 'http://api.example.com/v1.49/tasks'
Response examples (200)
[
{
"ID": "0kzzo1i0y4jz6027t0k7aezc7",
"Slot": 1,
"Spec": {
"Placement": {},
"Resources": {
"Limits": {},
"Reservations": {}
},
"ContainerSpec": {
"Image": "redis"
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
}
},
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"Status": {
"State": "running",
"Message": "started",
"Timestamp": "2016-06-07T21:07:31.290032978Z",
"ContainerStatus": {
"PID": 677,
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
}
},
"Version": {
"Index": 71
},
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
"DesiredState": "running",
"NetworksAttachments": [
{
"Network": {
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"Spec": {
"Name": "ingress",
"Labels": {
"com.docker.swarm.internal": "true"
},
"IPAMOptions": {
"Driver": {},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
},
"DriverConfiguration": {}
},
"Version": {
"Index": 18
},
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"IPAMOptions": {
"Driver": {
"Name": "default"
},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
}
},
"Addresses": [
"10.255.0.10/16"
]
}
]
},
{
"ID": "1yljwbmlr8er2waf8orvqpwms",
"Name": "hopeful_cori",
"Slot": 1,
"Spec": {
"Placement": {},
"Resources": {
"Limits": {},
"Reservations": {}
},
"ContainerSpec": {
"Image": "redis"
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
}
},
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"Status": {
"State": "shutdown",
"Message": "shutdown",
"Timestamp": "2016-06-07T21:07:30.202183143Z",
"ContainerStatus": {
"ContainerID": "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
}
},
"Version": {
"Index": 30
},
"CreatedAt": "2016-06-07T21:07:30.019104782Z",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"UpdatedAt": "2016-06-07T21:07:30.231958098Z",
"DesiredState": "shutdown",
"NetworksAttachments": [
{
"Network": {
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"Spec": {
"Name": "ingress",
"Labels": {
"com.docker.swarm.internal": "true"
},
"IPAMOptions": {
"Driver": {},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
},
"DriverConfiguration": {}
},
"Version": {
"Index": 18
},
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"IPAMOptions": {
"Driver": {
"Name": "default"
},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
}
},
"Addresses": [
"10.255.0.5/16"
]
}
]
}
]
Response examples (200)
[
{
"ID": "0kzzo1i0y4jz6027t0k7aezc7",
"Slot": 1,
"Spec": {
"Placement": {},
"Resources": {
"Limits": {},
"Reservations": {}
},
"ContainerSpec": {
"Image": "redis"
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
}
},
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"Status": {
"State": "running",
"Message": "started",
"Timestamp": "2016-06-07T21:07:31.290032978Z",
"ContainerStatus": {
"PID": 677,
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
}
},
"Version": {
"Index": 71
},
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
"DesiredState": "running",
"NetworksAttachments": [
{
"Network": {
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"Spec": {
"Name": "ingress",
"Labels": {
"com.docker.swarm.internal": "true"
},
"IPAMOptions": {
"Driver": {},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
},
"DriverConfiguration": {}
},
"Version": {
"Index": 18
},
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"IPAMOptions": {
"Driver": {
"Name": "default"
},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
}
},
"Addresses": [
"10.255.0.10/16"
]
}
]
},
{
"ID": "1yljwbmlr8er2waf8orvqpwms",
"Name": "hopeful_cori",
"Slot": 1,
"Spec": {
"Placement": {},
"Resources": {
"Limits": {},
"Reservations": {}
},
"ContainerSpec": {
"Image": "redis"
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
}
},
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"Status": {
"State": "shutdown",
"Message": "shutdown",
"Timestamp": "2016-06-07T21:07:30.202183143Z",
"ContainerStatus": {
"ContainerID": "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
}
},
"Version": {
"Index": 30
},
"CreatedAt": "2016-06-07T21:07:30.019104782Z",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"UpdatedAt": "2016-06-07T21:07:30.231958098Z",
"DesiredState": "shutdown",
"NetworksAttachments": [
{
"Network": {
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"Spec": {
"Name": "ingress",
"Labels": {
"com.docker.swarm.internal": "true"
},
"IPAMOptions": {
"Driver": {},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
},
"DriverConfiguration": {}
},
"Version": {
"Index": 18
},
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"IPAMOptions": {
"Driver": {
"Name": "default"
},
"Configs": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
}
},
"Addresses": [
"10.255.0.5/16"
]
}
]
}
]
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (503)
{
"message": "Something went wrong."
}
Response examples (503)
{
"message": "Something went wrong."
}