# POST /api/v1/org/{orgId}/perch/status

**Search devices for multiple apps**

## Search Devices

Searches for devices matching the provided application IDs within the specified organization.

This endpoint accepts a `SearchDevicesRequest` with a `queryAppIds` filter to retrieve the status of cloud-based security scan infrastructure for multiple applications in a single request. All requested application IDs must belong to the specified organization.

### Request

Provide a `SearchDevicesRequest` body with a `queryAppIds` filter in the `page.filters` field. If no `queryAppIds` filter is provided, the endpoint returns an empty response.

### Response

| Parameter | Default | Description |
|:---:|:---:|:---:|
|perchDevices|[]||
|totalCount|0||
|pageInfo|{}||

### Errors

- **403 Forbidden**: One or more application IDs do not belong to the specified organization.
- **404 Not Found**: Organization not found or user doesn't have access.

> Requires `read:device` permission.

## Parameters

- `orgId` (in: path, string<uuid>) *(required)* — UUID identifier for this StackHawk Organization.

## Request Body

### application/json

- `orgId` (string)
- `page` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters

### application/x-protobuf

- `orgId` (string)
- `page` (pagination.Page)
  - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
    - `multi` (pagination.MultiValue)
      - `values` (string[]) — The values of a given filter to filter on.
    - `name` (string) — The name of the filter to apply.
    - `value` (string) — A single value to filter on.
  - `number` (integer<int32>) — The page number to retrieve - 0 based
  - `query` (string) — The query string to filter the results.
  - `size` (integer<int32>) — the page size to retrieve.
  - `sortOptions` (pagination.SortOptions)
    - `direction` (string) — The direction to sort the results.
    - `field` (string) — Generic here, each type should define its own Enums + Converters

## Responses

### 200 — OK

#### application/json

- `pageInfo` (pagination.PageInfo)
  - `hasNext` (boolean) — Whether or not there is a next page.
  - `hasPrev` (boolean) — Whether or not there is a previous page.
  - `nextPage` (pagination.Page)
    - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` (pagination.MultiValue)
        - `values` (string[]) — The values of a given filter to filter on.
      - `name` (string) — The name of the filter to apply.
      - `value` (string) — A single value to filter on.
    - `number` (integer<int32>) — The page number to retrieve - 0 based
    - `query` (string) — The query string to filter the results.
    - `size` (integer<int32>) — the page size to retrieve.
    - `sortOptions` (pagination.SortOptions)
      - `direction` (string) — The direction to sort the results.
      - `field` (string) — Generic here, each type should define its own Enums + Converters
  - `prevPage` (pagination.Page)
    - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` (pagination.MultiValue)
        - `values` (string[]) — The values of a given filter to filter on.
      - `name` (string) — The name of the filter to apply.
      - `value` (string) — A single value to filter on.
    - `number` (integer<int32>) — The page number to retrieve - 0 based
    - `query` (string) — The query string to filter the results.
    - `size` (integer<int32>) — the page size to retrieve.
    - `sortOptions` (pagination.SortOptions)
      - `direction` (string) — The direction to sort the results.
      - `field` (string) — Generic here, each type should define its own Enums + Converters
  - `totalCount` (integer<int64>) — The total number of results.
- `perchDevices` (perch.PerchDevice[])
  - `applicationId` (string)
  - `command` (perch.PerchCommand)
    - `command` (string)
    - `config` (string)
    - `errors` (perch.PerchError[])
      - `errorType` (string)
      - `message` (string)
    - `id` (string)
    - `name` (string)
  - `configValidationResult` (perch.ConfigValidationResult)
    - `errors` (string[])
    - `fieldErrors` (perch.ValidationFieldError[])
      - `fieldName` (string)
      - `jsonPath` (string)
      - `message` (string)
    - `message` (string)
    - `success` (boolean)
  - `createdDate` (integer<int64>)
  - `deviceAddress` (string)
  - `id` (string)
  - `name` (string)
  - `orgId` (string)
  - `podType` (string)
  - `scanId` (string)
  - `status` (string)
  - `updatedDate` (integer<int64>)
  - `userId` (string)
- `totalCount` (integer<int64>)

#### application/x-protobuf

- `pageInfo` (pagination.PageInfo)
  - `hasNext` (boolean) — Whether or not there is a next page.
  - `hasPrev` (boolean) — Whether or not there is a previous page.
  - `nextPage` (pagination.Page)
    - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` (pagination.MultiValue)
        - `values` (string[]) — The values of a given filter to filter on.
      - `name` (string) — The name of the filter to apply.
      - `value` (string) — A single value to filter on.
    - `number` (integer<int32>) — The page number to retrieve - 0 based
    - `query` (string) — The query string to filter the results.
    - `size` (integer<int32>) — the page size to retrieve.
    - `sortOptions` (pagination.SortOptions)
      - `direction` (string) — The direction to sort the results.
      - `field` (string) — Generic here, each type should define its own Enums + Converters
  - `prevPage` (pagination.Page)
    - `filters` (pagination.Filter[]) — Generic filters that each type can define for its needs (isConnected=true, hasMapping=false, etc)
      - `multi` (pagination.MultiValue)
        - `values` (string[]) — The values of a given filter to filter on.
      - `name` (string) — The name of the filter to apply.
      - `value` (string) — A single value to filter on.
    - `number` (integer<int32>) — The page number to retrieve - 0 based
    - `query` (string) — The query string to filter the results.
    - `size` (integer<int32>) — the page size to retrieve.
    - `sortOptions` (pagination.SortOptions)
      - `direction` (string) — The direction to sort the results.
      - `field` (string) — Generic here, each type should define its own Enums + Converters
  - `totalCount` (integer<int64>) — The total number of results.
- `perchDevices` (perch.PerchDevice[])
  - `applicationId` (string)
  - `command` (perch.PerchCommand)
    - `command` (string)
    - `config` (string)
    - `errors` (perch.PerchError[])
      - `errorType` (string)
      - `message` (string)
    - `id` (string)
    - `name` (string)
  - `configValidationResult` (perch.ConfigValidationResult)
    - `errors` (string[])
    - `fieldErrors` (perch.ValidationFieldError[])
      - `fieldName` (string)
      - `jsonPath` (string)
      - `message` (string)
    - `message` (string)
    - `success` (boolean)
  - `createdDate` (integer<int64>)
  - `deviceAddress` (string)
  - `id` (string)
  - `name` (string)
  - `orgId` (string)
  - `podType` (string)
  - `scanId` (string)
  - `status` (string)
  - `updatedDate` (integer<int64>)
  - `userId` (string)
- `totalCount` (integer<int64>)

### 400 — Bad Request

- (no body)

### 401 — Unauthorized

- (no body)
