---
title: "Search for groups and devices."
method: GET
path: "/search"
tags: ["Search"]
---

# Search for groups and devices.

`GET /search`

Search results can be filtered by type, ancestorPath, and an arbitrary number of  additional filter parameters. Each filter can reference a field of the search result, for example `eq=fieldname:value` or traverse the asset library graph to  reference a related entry, for example `eq=traversal1:out:traversal2:in:fieldname:value`. All parameters are combined with a logical AND.
For all search parameters that include a search key and search value separated  by a colon (:) character, the HTTP parameter must be assembled using the following  sequence of steps:
 1. URL-encode the search value.
 2. Concatenate the search key (incl. any traversals), the colon character, and 
    result of step 1.
 3. URL-encode the output of step 2.
Failure to do so can yield incorrect search results for any search values that include the colon character.
For example, a search for entries with an outgoing "manufactured_by" relation whose  name starts with "Mfg+Asy Inc" should be expressed as: `/search?startsWith=manufactured_by%3Aout%3Aname%3AMfg%252BAsy%2520Inc`

## Query parameters

- `type` string[]
- `ntype` string[]
- `ancestorPath` string
- `includeAncestor` string[]
- `eq` string[]
- `neq` string[]
- `lt` number[]
- `lte` number[]
- `gt` number[]
- `gte` number[]
- `startsWith` string[]
- `endsWith` string[]
- `contains` string[]
- `exist` string[]
- `nexist` string[]
- `facetField` string
- `summarize` boolean
- `offset` integer
- `count` integer
- `sort` string

## Response `200`

successful operation

## Other responses

- `400` — Invalid input
- `404` — Not found

## Changes

- **2023-04-25** `b526b07268ce` — 2 info
  - added the new optional `query` request parameter `includeAncestor`
  - added the new optional `query` request parameter `ntype`
- **2021-08-28** `38800c573158` — 1 warning, 1 info
  - deleted the `query` request parameter `offset`
  - added the new optional `query` request parameter `count`
- **2021-08-25** `483d6ba924ec` — 2 breaking, 1 warning, 1 info
  - the `items/` response's property type/format changed from ``/`` to `object`/`` for status `200` (media type: application/vnd.aws-cdf-v1.0+json)
  - the `items/` response's property type/format changed from ``/`` to `object`/`` for status `200` (media type: application/vnd.aws-cdf-v2.0+json)
  - deleted the `query` request parameter `offset`
  - added the new optional `query` request parameter `offset`

[Change history](https://skmtc.dev/aws-samples/apis/aws-connected-device-framework-asset-library/changes/search/get.md)

---

[API](https://skmtc.dev/aws-samples/apis/aws-connected-device-framework-asset-library.md) · [All operations](https://skmtc.dev/aws-samples/apis/aws-connected-device-framework-asset-library/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aws-samples/aws-connected-device-framework-asset-library/revisions/78967b3d609f/schema)
