---
title: Get Plan By ID (Appium2)
slug: suite-documentation/a-Zr-get-plan-by-id-appium2
docTags: 
createdAt: 2026-08-26T08:24:52.506Z
---

This endpoint returns the details of a test plan by its ID.

For Appium2 plans, the response contains plan configuration, project information, mobile app details, execution settings, and related metadata.

Only enabled and non-deleted plans within the current company scope can be returned.

***

### Endpoint Information

- **URL**: `{gateway-url}/plans/{planId}`
- **Method**: `GET`
- **Authentication**: Required (`Bearer Token`)

### Request Headers

| Header          | Required | Description                                                                 |
| --------------- | -------- | --------------------------------------------------------------------------- |
| `Authorization` | Yes      | Bearer token used for authentication. Example: `Bearer <your_access_token>` |
| `X-Company-Id`  | Yes      | The company ID used by the gateway to authorize and route the request.      |
| `Accept`        | No       | Recommended value: `application/json`.                                      |

### Path Variables

| Parameter | Type | Required | Description                                         |
| --------- | ---- | -------- | --------------------------------------------------- |
| `planId`  | Long | Yes      | The ID of the test plan. Must be a positive number. |

### Request Body

This endpoint does not require a request body.

### Response Body

```json
{
  "data": {
    "id": 316,
    "planName": "Demo",
    "groupPlan": false,
    "description": "",
    "enabled": true,
    "deleted": false,
    "planParallelTestLimit": 50,
    "periodId": 318,
    "projectId": 913,
    "projectName": "Demo",
    "projectTestFramework": "APPIUM2",
    "userId": 13,
    "companyId": 2,
    "failedTestRetryCount": 0,
    "maxExecutionTime": 3600,
    "testRunType": "CROSS",
    "screenShotType": "YES",
    "videoEnabled": true,
    "uninstallApp": false,
    "clearAppData": false,
    "iosMobileApp": {
      "id": 84,
      "mobileAppName": "Demo.ipa",
      "mobileAppHash": "Demo",
      "mobileAppMetadata": "{\"bundleName\":\"Demo\"}",
      "operatingSystem": "IOS",
      "createdAt": "2026-08-18T12:08:41.165927056Z"
    },
    "androidMobileApp": null,
    "isSigned": true,
    "testFileType": "APPIUM_GAUGE",
    "testRunnerTool": "MAVEN",
    "testDispatchMethodType": "ONE_BY_ONE",
    "alertsEnabled": false,
    "gridType": "TESTINIUM_ENTERPRISE",
    "isParent": false,
    "parentId": null
  }
}
```

### Response Fields

| Field                         | Type    | Description                                                             |
| ----------------------------- | ------- | ----------------------------------------------------------------------- |
| `data`                        | Object  | Test plan payload.                                                      |
| `data.id`                     | Long    | Unique identifier of the test plan.                                     |
| `data.planName`               | String  | Name of the test plan.                                                  |
| `data.groupPlan`              | Boolean | Indicates whether the plan is a group plan.                             |
| `data.description`            | String  | Description of the test plan.                                           |
| `data.enabled`                | Boolean | Indicates whether the plan is enabled.                                  |
| `data.deleted`                | Boolean | Indicates whether the plan is marked as deleted.                        |
| `data.planParallelTestLimit`  | Integer | Maximum parallel test limit for this plan.                              |
| `data.periodId`               | Long    | ID of the period configuration.                                         |
| `data.projectId`              | Long    | ID of the project that owns the plan.                                   |
| `data.projectName`            | String  | Name of the project.                                                    |
| `data.projectTestFramework`   | String  | Project framework. For Appium2 plans, this value is `APPIUM2`.          |
| `data.userId`                 | Long    | ID of the user associated with the plan.                                |
| `data.companyId`              | Long    | ID of the company that owns the plan.                                   |
| `data.failedTestRetryCount`   | Integer | Number of retries for failed tests.                                     |
| `data.maxExecutionTime`       | Integer | Maximum execution time in seconds.                                      |
| `data.testRunType`            | String  | Test run mode. Possible values: `CROSS`, `SEQUENCE`.                    |
| `data.screenShotType`         | String  | Screenshot behavior. Possible values: `YES`, `NO`, `ONLY_FAILURE`.      |
| `data.videoEnabled`           | Boolean | Indicates whether video recording is enabled.                           |
| `data.uninstallApp`           | Boolean | Indicates whether the mobile app should be uninstalled after execution. |
| `data.clearAppData`           | Boolean | Indicates whether app data should be cleared before execution.          |
| `data.iosMobileApp`           | Object  | Selected iOS mobile app summary, if available.                          |
| `data.androidMobileApp`       | Object  | Selected Android mobile app summary, if available.                      |
| `data.isSigned`               | Boolean | Indicates whether the selected iOS app is signed.                       |
| `data.testFileType`           | String  | Type of test files used by the project.                                 |
| `data.testRunnerTool`         | String  | Test runner tool used by the project.                                   |
| `data.testDispatchMethodType` | String  | Dispatch strategy. Possible values: `ONE_BY_ONE`, `ALL_IN_ONE`.         |
| `data.alertsEnabled`          | Boolean | Indicates whether alerts are enabled for this plan.                     |
| `data.gridType`               | String  | Grid type used for execution.                                           |
| `data.isParent`               | Boolean | Indicates whether this plan is a parent plan.                           |
| `data.parentId`               | Long    | Parent plan ID, if this is a child plan.                                |

### Error Response Format

```json
{
  "instance": "/plans/999999",
  "status": 404,
  "title": "Not Found",
  "type": "https://errors.testinium.com/exception",
  "timestamp": "2026-08-18T12:08:41.165927056Z",
  "errorType": "EXCEPTION",
  "errors": {
    "code": 10003,
    "message": "Plan with id 999999 not found!"
  }
}
```

### HTTP Error Codes

| HTTP Code | Error Message           | Description                                                                                |
| --------- | ----------------------- | ------------------------------------------------------------------------------------------ |
| `400`     | `Bad Request`           | Path variable is invalid or request could not be processed.                                |
| `401`     | `Unauthorized`          | Authentication is missing or invalid.                                                      |
| `403`     | `Forbidden`             | User does not have permission for this operation or company.                               |
| `404`     | `Not Found`             | Plan was not found, deleted, disabled, or not accessible within the current company scope. |
| `405`     | `Method Not Allowed`    | The endpoint was called with an unsupported HTTP method.                                   |
| `500`     | `Internal Server Error` | An unexpected error occurred on the server side.                                           |
| `503`     | `Service Unavailable`   | Project service is unavailable or cannot be reached through the gateway.                   |

### Application Error Codes

| Code    | HTTP Status | Source            | Description                                                       |
| ------- | ----------- | ----------------- | ----------------------------------------------------------------- |
| `10003` | `404`       | Project           | Test plan not found.                                              |
| `10001` | `401`       | Gateway           | Authentication is required.                                       |
| `10002` | `401`       | Gateway           | Token is invalid or cannot be verified.                           |
| `10003` | `403`       | Gateway           | Authorization failed for the requested resource.                  |
| `10004` | `400`       | Gateway           | A required header, such as `X-Company-Id`, is missing or invalid. |
| `10008` | `503`       | Gateway           | Routed service is unavailable.                                    |
| `20005` | `400`       | Common Validation | Path variable validation failed.                                  |
| `20008` | `400`       | Common Validation | Path variable type is invalid.                                    |
| `20009` | `405`       | Common Validation | HTTP method is not supported.                                     |

### Example Request

```bash
curl --location '{gateway-url}/plans/{planId}' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'X-Company-Id: <company_id>'
```

