# Task


[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





Schema constraints and annotations:

```json
{
  "example": {
    "AssignedGenericResources": [
      {
        "DiscreteResourceSpec": {
          "Kind": "SSD",
          "Value": 3
        }
      },
      {
        "NamedResourceSpec": {
          "Kind": "GPU",
          "Value": "UUID1"
        }
      },
      {
        "NamedResourceSpec": {
          "Kind": "GPU",
          "Value": "UUID2"
        }
      }
    ],
    "CreatedAt": "2016-06-07T21:07:31.171892745Z",
    "DesiredState": "running",
    "ID": "0kzzo1i0y4jz6027t0k7aezc7",
    "NetworksAttachments": [
      {
        "Addresses": [
          "10.255.0.10/16"
        ],
        "Network": {
          "CreatedAt": "2016-06-07T20:31:11.912919752Z",
          "DriverState": {
            "Name": "overlay",
            "Options": {
              "com.docker.network.driver.overlay.vxlanid_list": "256"
            }
          },
          "ID": "4qvuz4ko70xaltuqbt8956gd1",
          "IPAMOptions": {
            "Configs": [
              {
                "Gateway": "10.255.0.1",
                "Subnet": "10.255.0.0/16"
              }
            ],
            "Driver": {
              "Name": "default"
            }
          },
          "Spec": {
            "DriverConfiguration": {},
            "IPAMOptions": {
              "Configs": [
                {
                  "Gateway": "10.255.0.1",
                  "Subnet": "10.255.0.0/16"
                }
              ],
              "Driver": {}
            },
            "Labels": {
              "com.docker.swarm.internal": "true"
            },
            "Name": "ingress"
          },
          "UpdatedAt": "2016-06-07T21:07:29.955277358Z",
          "Version": {
            "Index": 18
          }
        }
      }
    ],
    "NodeID": "60gvrl6tm78dmak4yl7srz94v",
    "ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
    "Slot": 1,
    "Spec": {
      "ContainerSpec": {
        "Image": "redis"
      },
      "Placement": {},
      "Resources": {
        "Limits": {},
        "Reservations": {}
      },
      "RestartPolicy": {
        "Condition": "any",
        "MaxAttempts": 0
      }
    },
    "Status": {
      "ContainerStatus": {
        "ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
        "PID": 677
      },
      "Message": "started",
      "State": "running",
      "Timestamp": "2016-06-07T21:07:31.290032978Z"
    },
    "UpdatedAt": "2016-06-07T21:07:31.376370513Z",
    "Version": {
      "Index": 71
    }
  },
  "properties": {
    "AssignedGenericResources": {
      "$ref": "#/components/schemas/GenericResources"
    },
    "CreatedAt": {
      "format": "dateTime",
      "type": "string"
    },
    "DesiredState": {
      "$ref": "#/components/schemas/TaskState"
    },
    "ID": {
      "description": "The ID of the task.",
      "type": "string"
    },
    "JobIteration": {
      "$ref": "#/components/schemas/ObjectVersion",
      "description": "If the Service this Task belongs to is a job-mode service, contains\nthe JobIteration of the Service this Task was created for. Absent if\nthe Task was created for a Replicated or Global Service.\n"
    },
    "Labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined key/value metadata.",
      "type": "object"
    },
    "Name": {
      "description": "Name of the task.",
      "type": "string"
    },
    "NetworksAttachments": {
      "description": "The networks that this task is attached to, and the addresses the\ntask was assigned on each of them.\n",
      "items": {
        "$ref": "#/components/schemas/NetworkAttachment"
      },
      "type": "array"
    },
    "NodeID": {
      "description": "The ID of the node that this task is on.",
      "type": "string"
    },
    "ServiceID": {
      "description": "The ID of the service this task is part of.",
      "type": "string"
    },
    "Slot": {
      "type": "integer"
    },
    "Spec": {
      "$ref": "#/components/schemas/TaskSpec"
    },
    "Status": {
      "$ref": "#/components/schemas/TaskStatus"
    },
    "UpdatedAt": {
      "format": "dateTime",
      "type": "string"
    },
    "Version": {
      "$ref": "#/components/schemas/ObjectVersion"
    }
  },
  "type": "object"
}
```



