---
type: api
title: Get plan activity
description: Retrieves details for a single plan activity for the given resource.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-get-deployment-resource-plan-activity
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-get-deployment-resource-plan-activity
products:
  - Elastic Cloud Enterprise
---

# Get plan activity

## Paths

- `GET` `/deployments/{deployment_id}/{resource_kind}/{ref_id}/activity/{attempt_id}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `deployment_id` (string)
  Identifier for the Deployment
- `resource_kind` (enum)
  The kind of resource
  Values: `elasticsearch`, `kibana`, `apm`, `appsearch`, `enterprise_search`, `integrations_server`
- `ref_id` (string)
  User-specified RefId for the Resource (or '_main' if there is only one)
- `attempt_id` (string)
  Attempt id for the activity

## Description

Retrieves details for a single plan activity for the given resource.

## Responses

#### `200`

Returning the single plan activity for the specified resource

`application/json`

- `plan_attempt_id` (string)
- `plan_attempt_name` (string)
- `healthy` (boolean)
- `attempt_start_time` (string)
- `attempt_end_time` (string)
- `plan_end_time` (string)
- `plan` (object)
- `plan_attempt_log` ([] ClusterPlanStepInfo)
  - `step_id` (string)
    ID of current step
  - `started` (string)
    When the step started (ISO format in UTC)
  - `completed` (string)
    When the step completed (ISO format in UTC)
  - `duration_in_millis` (integer)
    The duration of the step in MS
  - `status` (enum)
    The status of the step (success, warning, error - warning means something didn't go as expected but it was not serious enough to abort the plan)
    Values: `success`, `warning`, `error`, `pending`
  - `stage` (enum)
    Current stage that the step is in
    Values: `starting`, `completed`, `in_progress`
  - `info_log` ([] ClusterPlanStepLogMessageInfo)
    Human readable summaries of the step, including messages for each stage of the step
    - `timestamp` (string)
      Timestamp marking on info log of step
    - `delta_in_millis` (integer)
      Time in milliseconds since previous log message
    - `stage` (enum)
      Stage that info log message takes place in
      Values: `starting`, `completed`, `in_progress`
    - `message` (string)
      Human readable log message
    - `details` (map string to string)
      A map with details for the log about what happened during the step execution. Keys and values for are always both strings, representing the name of the detail and its value, respectively.
    - `internal_details` (map string to string)
      A json object with sensitive details for the log, visible only to admins. May contain nested json objects.
    - `failure_type` (string)
      The failure type, in case the step failed
- `source` ({} ChangeSourceInfo)
  A container for information about the source of a change.
  - `facilitator` (string)
    The service where the change originated from
  - `action` (string)
    The type of plan change that was initiated
  - `date` (string)
    The time the change was initiated
  - `user_id` (string)
    The user that requested the change
  - `admin_id` (string)
    The admin user that requested the change
  - `remote_addresses` ([] string)
    The host addresses of the user that originated the change
- `warnings` ([] ClusterPlanWarning)
  - `code` (string)
    A unique warning code
  - `message` (string)
    A description of the warning
  - `step_id` (string)
    The ID of the step which produced a warning, if any
- `error` ({} ClusterPlanAttemptError)
  Information about an error during a plan attempt.
  - `timestamp` (string)
    Timestamp marking on info log of step
  - `message` (string)
    Human readable error message
  - `details` (map string to string)
    A map with details regarding the error. Both the keys and values are always strings, representing the name of the detail and its value, respectively.
  - `failure_type` (string)
    The failure type
#### `404`

* The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)
* The Resource specified by {ref_id} cannot be found. (code: `deployments.deployment_resource_not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
GET /deployments/{deployment_id}/{resource_kind}/{ref_id}/activity/{attempt_id}
```

#### curl

```curl
curl -X GET "/deployments/{deployment_id}/{resource_kind}/{ref_id}/activity/{attempt_id}"
```

