Skip to content
Get started

List studies with pagination

viewer.studies.list(StudyListParams**kwargs) -> SyncCursorStudies[StudyListResponse]
get/v1/viewer/studies

Retrieves a paginated list of studies with optional filtering by assignment, severity, description, cancellation status, and viewer status. Returns up to 100 studies per request.

ParametersExpand Collapse
assigned_to: Optional[str]

Filter by assigned user ID (null = explicitly unassigned). Format: usr_<32-hex-chars>

cursor: Optional[str]

Base64 encoded cursor from previous response

is_cancelled: Optional[bool]

Filter by cancellation status

limit: Optional[float]

Number of results to return (1-100)

minimum1
maximum100
severity: Optional[Literal["normal", "high", "stat"]]

Filter by study severity

Accepts one of the following:
"normal"
"high"
"stat"
study_description: Optional[str]

Filter by study description (contains match)

study_viewer_status: Optional[Literal["incomplete", "complete"]]

Filter by study viewer status

Accepts one of the following:
"incomplete"
"complete"
ReturnsExpand Collapse
class StudyListResponse:

A study entity in the Viewer system with viewing status

cancelled_at: Optional[datetime]

Timestamp when the study was cancelled, null if not cancelled

formatdate-time
created_at: Optional[datetime]

Timestamp when the study was created

formatdate-time
is_cancelled: bool

Whether the study has been cancelled

severity: Literal["normal", "high", "stat"]

Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention

Accepts one of the following:
"normal"
"high"
"stat"
study_description: str

Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT')

minLength1
study_id: str

Unique study identifier. Format: stu_{32-hex-chars}

study_instance_uid: str

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

minLength1
study_viewer_status: Literal["incomplete", "complete"]
Accepts one of the following:
"incomplete"
"complete"
updated_at: Optional[datetime]

Timestamp when the study was last updated

formatdate-time
assigned_to: Optional[UserReference]

A reference to a user with basic identifying information

email: str

User's email address

user_id: str

Unique user identifier. Format: usr_{32-hex-chars}

first_name: Optional[str]

User's first name

last_name: Optional[str]

User's last name

middle_name: Optional[str]

User's middle name

suffix1: Optional[str]

Name suffix (e.g., 'MD', 'Jr.')

suffix2: Optional[str]

Additional name suffix

created_by_api_key: Optional[APIKeyReference]

A reference to an API key with basic identifying information

api_key_id: str

Unique API key identifier (UUIDv4 format)

formatuuid
description: str

Human-readable description of the API key

minLength1
is_viewer_enabled: Optional[bool]

Whether this API key has access to the Viewer product

created_by_user: Optional[UserReference]

A reference to a user with basic identifying information

email: str

User's email address

user_id: str

Unique user identifier. Format: usr_{32-hex-chars}

first_name: Optional[str]

User's first name

last_name: Optional[str]

User's last name

middle_name: Optional[str]

User's middle name

suffix1: Optional[str]

Name suffix (e.g., 'MD', 'Jr.')

suffix2: Optional[str]

Additional name suffix

metadata: Optional[Dict[str, str]]

Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars

org: Optional[OrgReference]

A reference to an organization with basic identifying information

org_id: str

Unique organization identifier. Format: org_{32-hex-chars}

org_name: str

Name of the organization

minLength1
List studies with pagination
import os
from avara import Avara

client = Avara(
    api_key=os.environ.get("AVARA_API_KEY"),  # This is the default and can be omitted
)
page = client.viewer.studies.list()
page = page.studies[0]
print(page.study_instance_uid)
{
  "hasMore": true,
  "studies": [
    {
      "cancelledAt": null,
      "createdAt": "2024-03-15T10:30:00Z",
      "isCancelled": false,
      "severity": "high",
      "studyDescription": "CT Chest/Abdomen/Pelvis",
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
      "studyViewerStatus": "incomplete",
      "updatedAt": "2024-03-15T14:20:00Z",
      "assignedTo": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "createdByApiKey": {
        "apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
        "description": "Production API Key",
        "isViewerEnabled": true
      },
      "createdByUser": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "metadata": {
        "department": "radiology",
        "priority": "urgent"
      },
      "org": {
        "orgId": "org_1234567890abcdef1234567890abcdef",
        "orgName": "City Medical Center"
      }
    }
  ],
  "cursor": "cursor"
}
Returns Examples
{
  "hasMore": true,
  "studies": [
    {
      "cancelledAt": null,
      "createdAt": "2024-03-15T10:30:00Z",
      "isCancelled": false,
      "severity": "high",
      "studyDescription": "CT Chest/Abdomen/Pelvis",
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
      "studyViewerStatus": "incomplete",
      "updatedAt": "2024-03-15T14:20:00Z",
      "assignedTo": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "createdByApiKey": {
        "apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
        "description": "Production API Key",
        "isViewerEnabled": true
      },
      "createdByUser": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "metadata": {
        "department": "radiology",
        "priority": "urgent"
      },
      "org": {
        "orgId": "org_1234567890abcdef1234567890abcdef",
        "orgName": "City Medical Center"
      }
    }
  ],
  "cursor": "cursor"
}