---
title: "Initiates a task inspect operation"
method: GET
path: "/tasks"
tags: ["tasks"]
---

# Initiates a task inspect operation

`GET /tasks`

Initiates a task inspect operation

## Request body

- TaskInspectConfig
  - `id` string, required
  - `handle` object, required

## Response `200`

OK

- TaskInspectResponse
  - `id` string, required
  - `state` string
  - `exitCode` integer
  - `processConfig` ProcessConfig
    - `pid` integer
    - `execPath` string
    - `execArgs` string[]
    - `workingDir` string, nullable
    - `user` string
    - `env` string[]
    - `status` string
    - `startTime` integer
    - `stopTime` integer
    - `exitCode` integer
    - `errorMsg` string
  - `openStdin` boolean
  - `openStderr` boolean
  - `openStdout` boolean
  - `tty` boolean
  - `user` string
  - `pid` integer

## Other responses

- `404` — not found
- `409` — Task failed due to power state change
- `500` — Inspect of task failed

## Changes

- **2018-06-14** `d95851b27556` — 1 info
  - added the new optional `header` request parameter `Op-ID` to all path's operations
- **2017-11-03** `b1e8e7dd4ccb` — 1 info
  - added the non-success response with the status `409`
- **2017-03-23** `4f48eeb920b0` — 1 info
  - endpoint added
- **2016-09-22** `cd3b04ac340a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/vmware/apis/port-layer-api/changes/tasks/get.md)

---

[API](https://skmtc.dev/vmware/apis/port-layer-api.md) · [All operations](https://skmtc.dev/vmware/apis/port-layer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vmware/port-layer-api/revisions/5fff0b8814c7/schema)
