---
title: "POST /datastore/{datastoreId}/searchImageSets"
method: POST
path: "/datastore/{datastoreId}/searchImageSets"
---

# POST /datastore/{datastoreId}/searchImageSets

`POST /datastore/{datastoreId}/searchImageSets`

Search image sets based on defined input attributes.

`SearchImageSets` accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as `(lowerBound, upperBound)`.

By default, `SearchImageSets` uses the `updatedAt` field for sorting in descending order from newest to oldest.

## Path parameters

- `datastoreId` string, required

## Query parameters

- `maxResults` integer
- `nextToken` string

## Request body

- object
  - `searchCriteria` object — The search criteria.
    - `filters` SearchFilter[] — The filters for the search criteria.
      - `values` SearchByAttributeValue[], required — The search filter values.
        - `DICOMPatientId` string, password — The patient ID input for search.
        - `DICOMAccessionNumber` string, password — The DICOM accession number for search.
        - `DICOMStudyId` string, password — The DICOM study ID for search.
        - `DICOMStudyInstanceUID` string, password — The DICOM study instance UID for search.
        - `DICOMSeriesInstanceUID` string, password — The Series Instance UID input for search.
        - `createdAt` string, date-time — The created at time of the image set provided for search.
        - `updatedAt` string, date-time — The timestamp input for search.
        - `DICOMStudyDateAndTime` object — The aggregated structure containing DICOM study date and study time for search.
          - `DICOMStudyDate` string, password, required — The DICOM study date provided in <code>yyMMdd</code> format.
          - `DICOMStudyTime` string, password — The DICOM study time provided in <code>HHmmss.FFFFFF</code> format.
        - `isPrimary` boolean — The primary image set flag provided for search.
      - `operator` 'EQUAL' | 'BETWEEN', required — The search filter operator for <code>imageSetDateTime</code>.
    - `sort` object — The sort input for search criteria.
      - `sortOrder` 'ASC' | 'DESC', required — The sort order for search criteria.
      - `sortField` 'updatedAt' | 'createdAt' | 'DICOMStudyDateAndTime', required — The sort field for search criteria.

## Response `200`

Success

- SearchImageSetsResponse
  - `imageSetsMetadataSummaries` ImageSetsMetadataSummary[], required — The model containing the image set results.
    - `imageSetId` string, required — The image set identifier.
    - `version` integer — The image set version.
    - `createdAt` string, date-time — The time an image set is created. Sample creation date is provided in <code>1985-04-12T23:20:50.52Z</code> format.
    - `updatedAt` string, date-time — The time an image set was last updated.
    - `lastAccessedAt` string, date-time — When the image set was last accessed.
    - `storageTier` 'FREQUENT_ACCESS' | 'ARCHIVE_INSTANT_ACCESS' — The image set's storage tier.
    - `DICOMTags` object — The DICOM tags associated with the image set.
      - `DICOMPatientId` string, password — The unique identifier for a patient in a DICOM Study.
      - `DICOMPatientName` string, password — The patient name.
      - `DICOMPatientBirthDate` string, password — The patient birth date.
      - `DICOMPatientSex` string, password — The patient sex.
      - `DICOMStudyInstanceUID` string, password — The DICOM provided identifier for the Study Instance UID.
      - `DICOMStudyId` string, password — The DICOM provided identifier for the Study ID.
      - `DICOMStudyDescription` string, password — The DICOM provided Study Description.
      - `DICOMNumberOfStudyRelatedSeries` integer — The total number of series in the DICOM study.
      - `DICOMNumberOfStudyRelatedInstances` integer — The total number of instances in the DICOM study.
      - `DICOMAccessionNumber` string, password — The accession number for the DICOM study.
      - `DICOMSeriesInstanceUID` string, password — The DICOM provided identifier for the Series Instance UID.
      - `DICOMSeriesModality` string, password — The DICOM provided identifier for the series Modality.
      - `DICOMSeriesBodyPart` string, password — The DICOM provided identifier for the series Body Part Examined.
      - `DICOMSeriesNumber` integer — The DICOM provided identifier for the Series Number.
      - `DICOMStudyDate` string, password — The study date.
      - `DICOMStudyTime` string, password — The study time.
    - `isPrimary` boolean — The flag to determine whether the image set is primary or not.
  - `sort` object — The sort order for image set search results.
    - `sortOrder` 'ASC' | 'DESC', required — The sort order for search criteria.
    - `sortField` 'updatedAt' | 'createdAt' | 'DICOMStudyDateAndTime', required — The sort field for search criteria.
  - `nextToken` string — The token for pagination results.

## Other responses

- `480` — ThrottlingException
- `481` — ConflictException
- `482` — AccessDeniedException
- `483` — ValidationException
- `484` — InternalServerException
- `485` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/medical-imaging.md) · [All operations](https://skmtc.net/aws/apis/medical-imaging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/medical-imaging/versions/a4a282481097/schema)
