# Studies ## Create `StudyCreateResponse viewer().studies().create(StudyCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v1/viewer/studies` Creates a new study in the Viewer system with the specified DICOM Study Instance UID and metadata. The study can be optionally assigned to a user. ### Parameters - `StudyCreateParams params` - `Severity severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `String studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `Optional assignedTo` User ID to assign the study to. Format: usr_{32-hex-chars} - `Optional expressCustomerId` Express customer ID for the study. Format: cus_{32-hex-chars} - `Optional metadata` Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Returns - `class StudyCreateResponse:` A study entity in the Viewer system with viewing status - `Optional cancelledAt` Timestamp when the study was cancelled, null if not cancelled - `Optional createdAt` Timestamp when the study was created - `boolean isCancelled` Whether the study has been cancelled - `Severity severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `String studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `String studyId` Unique study identifier. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `StudyViewerStatus studyViewerStatus` - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` - `Optional updatedAt` Timestamp when the study was last updated - `Optional assignedTo` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional createdByApiKey` A reference to an API key with basic identifying information - `String apiKeyId` Unique API key identifier (UUIDv4 format) - `String description` Human-readable description of the API key - `Optional isViewerEnabled` Whether this API key has access to the Viewer product - `Optional createdByUser` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional expressCustomer` A reference to an Express customer with basic identifying information - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `Optional metadata` Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyCreateParams; import com.avara.models.viewer.studies.StudyCreateResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyCreateParams params = StudyCreateParams.builder() .severity(StudyCreateParams.Severity.HIGH) .studyDescription("CT Chest/Abdomen/Pelvis") .studyInstanceUid("1.2.840.113619.2.55.3.604688119.868.1234567890.123") .build(); StudyCreateResponse study = client.viewer().studies().create(params); } } ``` ## List `StudyListPage viewer().studies().list(StudyListParamsparams = StudyListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **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. ### Parameters - `StudyListParams params` - `Optional assignedTo` Filter by assigned user ID (null = explicitly unassigned). Format: usr_<32-hex-chars> - `Optional cursor` Base64 encoded cursor from previous response - `Optional expressCustomerId` Filter by Express customer ID (null = studies with no customer). Format: cus_{32-hex-chars} - `Optional isCancelled` Filter by cancellation status - `Optional limit` Number of results to return (1-100) - `Optional severity` Filter by study severity - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `Optional studyDescription` Filter by study description (contains match) - `Optional studyViewerStatus` Filter by study viewer status - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` ### Returns - `class StudyListResponse:` A study entity in the Viewer system with viewing status - `Optional cancelledAt` Timestamp when the study was cancelled, null if not cancelled - `Optional createdAt` Timestamp when the study was created - `boolean isCancelled` Whether the study has been cancelled - `Severity severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `String studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `String studyId` Unique study identifier. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `StudyViewerStatus studyViewerStatus` - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` - `Optional updatedAt` Timestamp when the study was last updated - `Optional assignedTo` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional createdByApiKey` A reference to an API key with basic identifying information - `String apiKeyId` Unique API key identifier (UUIDv4 format) - `String description` Human-readable description of the API key - `Optional isViewerEnabled` Whether this API key has access to the Viewer product - `Optional createdByUser` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional expressCustomer` A reference to an Express customer with basic identifying information - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `Optional metadata` Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyListPage; import com.avara.models.viewer.studies.StudyListParams; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyListPage page = client.viewer().studies().list(); } } ``` ## Retrieve `StudyRetrieveResponse viewer().studies().retrieve(StudyRetrieveParamsparams = StudyRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v1/viewer/studies/{studyId}` Retrieves a single study by its unique study ID. Returns the complete study object with all metadata and status information. ### Parameters - `StudyRetrieveParams params` - `Optional studyId` Unique study identifier. Format: stu_{32-hex-chars} ### Returns - `class StudyRetrieveResponse:` A study entity in the Viewer system with viewing status - `Optional cancelledAt` Timestamp when the study was cancelled, null if not cancelled - `Optional createdAt` Timestamp when the study was created - `boolean isCancelled` Whether the study has been cancelled - `Severity severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `String studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `String studyId` Unique study identifier. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `StudyViewerStatus studyViewerStatus` - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` - `Optional updatedAt` Timestamp when the study was last updated - `Optional assignedTo` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional createdByApiKey` A reference to an API key with basic identifying information - `String apiKeyId` Unique API key identifier (UUIDv4 format) - `String description` Human-readable description of the API key - `Optional isViewerEnabled` Whether this API key has access to the Viewer product - `Optional createdByUser` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional expressCustomer` A reference to an Express customer with basic identifying information - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `Optional metadata` Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyRetrieveParams; import com.avara.models.viewer.studies.StudyRetrieveResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyRetrieveResponse study = client.viewer().studies().retrieve("stu_1234567890abcdef1234567890abcdef"); } } ``` ## Update `StudyUpdateResponse viewer().studies().update(StudyUpdateParamsparams = StudyUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **patch** `/v1/viewer/studies/{studyId}` Updates a study's properties including description, severity, assignment, organization, and metadata. All fields are optional - only provided fields will be updated. ### Parameters - `StudyUpdateParams params` - `Optional studyId` Unique study identifier. Format: stu_{32-hex-chars} - `Optional assignedTo` User ID to assign the study to, or null to unassign. Format: usr_{32-hex-chars} - `Optional metadata` - `Optional severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `Optional studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `Optional studyViewerStatus` - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` ### Returns - `class StudyUpdateResponse:` A study entity in the Viewer system with viewing status - `Optional cancelledAt` Timestamp when the study was cancelled, null if not cancelled - `Optional createdAt` Timestamp when the study was created - `boolean isCancelled` Whether the study has been cancelled - `Severity severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `String studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `String studyId` Unique study identifier. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `StudyViewerStatus studyViewerStatus` - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` - `Optional updatedAt` Timestamp when the study was last updated - `Optional assignedTo` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional createdByApiKey` A reference to an API key with basic identifying information - `String apiKeyId` Unique API key identifier (UUIDv4 format) - `String description` Human-readable description of the API key - `Optional isViewerEnabled` Whether this API key has access to the Viewer product - `Optional createdByUser` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional expressCustomer` A reference to an Express customer with basic identifying information - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `Optional metadata` Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyUpdateParams; import com.avara.models.viewer.studies.StudyUpdateResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyUpdateResponse study = client.viewer().studies().update("stu_1234567890abcdef1234567890abcdef"); } } ``` ## Cancel `StudyCancelResponse viewer().studies().cancel(StudyCancelParamsparams = StudyCancelParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v1/viewer/studies/cancel` Marks a study as cancelled. Cancelled studies are preserved but flagged as inactive. Can be identified by either study ID or DICOM Study Instance UID. ### Parameters - `StudyCancelParams params` - `Optional studyId` Unique study identifier. Format: stu_{32-hex-chars} - `Optional studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') ### Returns - `class StudyCancelResponse:` Response for cancelling a study in Viewer - `boolean success` - `Optional message` ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyCancelParams; import com.avara.models.viewer.studies.StudyCancelResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyCancelResponse response = client.viewer().studies().cancel(); } } ``` ## Uncancel `StudyUncancelResponse viewer().studies().uncancel(StudyUncancelParamsparams = StudyUncancelParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v1/viewer/studies/uncancel` Restores a cancelled study to active status. The study must have been previously cancelled. Can be identified by either study ID or DICOM Study Instance UID. ### Parameters - `StudyUncancelParams params` - `Optional studyId` Unique study identifier. Format: stu_{32-hex-chars} - `Optional studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') ### Returns - `class StudyUncancelResponse:` Response for uncancelling a study in Viewer - `boolean success` - `Optional message` ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyUncancelParams; import com.avara.models.viewer.studies.StudyUncancelResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyUncancelResponse response = client.viewer().studies().uncancel(); } } ``` ## Reroute URL `StudyRerouteUrlResponse viewer().studies().rerouteUrl(StudyRerouteUrlParamsparams = StudyRerouteUrlParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v1/viewer/studies/reroute-url` Generates a tokenized URL that redirects users directly to the Avara Viewer for the specified study. The URL includes authentication and is time-limited for security. ### Parameters - `StudyRerouteUrlParams params` - `Optional studyId` Unique study identifier. Format: stu_{32-hex-chars} - `Optional studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') ### Returns - `class StudyRerouteUrlResponse:` Response containing the generated reroute URL for a study in Viewer - `String url` ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyRerouteUrlParams; import com.avara.models.viewer.studies.StudyRerouteUrlResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyRerouteUrlResponse response = client.viewer().studies().rerouteUrl(); } } ``` ## Retrieve By Uid `StudyRetrieveByUidResponse viewer().studies().retrieveByUid(StudyRetrieveByUidParamsparams = StudyRetrieveByUidParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v1/viewer/studies/by-uid/{studyInstanceUid}` Retrieves a single study by its DICOM Study Instance UID. This is useful when you have the DICOM UID but not the Avara study ID. ### Parameters - `StudyRetrieveByUidParams params` - `Optional studyInstanceUid` DICOM Study Instance UID. Format: numbers and dots (e.g., 1.2.840.10008.5.1.4.1.1.2). ### Returns - `class StudyRetrieveByUidResponse:` A study entity in the Viewer system with viewing status - `Optional cancelledAt` Timestamp when the study was cancelled, null if not cancelled - `Optional createdAt` Timestamp when the study was created - `boolean isCancelled` Whether the study has been cancelled - `Severity severity` Priority level of the study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention - `NORMAL("normal")` - `HIGH("high")` - `STAT("stat")` - `String studyDescription` Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT') - `String studyId` Unique study identifier. Format: stu_{32-hex-chars} - `String studyInstanceUid` DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2') - `StudyViewerStatus studyViewerStatus` - `INCOMPLETE("incomplete")` - `COMPLETE("complete")` - `Optional updatedAt` Timestamp when the study was last updated - `Optional assignedTo` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional createdByApiKey` A reference to an API key with basic identifying information - `String apiKeyId` Unique API key identifier (UUIDv4 format) - `String description` Human-readable description of the API key - `Optional isViewerEnabled` Whether this API key has access to the Viewer product - `Optional createdByUser` A reference to a user with basic identifying information - `String email` User's email address - `String userId` Unique user identifier. Format: usr_{32-hex-chars} - `Optional firstName` User's first name - `Optional lastName` User's last name - `Optional middleName` User's middle name - `Optional suffix1` Name suffix (e.g., 'MD', 'Jr.') - `Optional suffix2` Additional name suffix - `Optional expressCustomer` A reference to an Express customer with basic identifying information - `String expressCustomerId` Unique Express customer identifier. Format: cus_{32-hex-chars} - `String expressCustomerName` Name of the Express customer - `Optional metadata` Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars ### Example ```java package com.avara.example; import com.avara.client.AvaraClient; import com.avara.client.okhttp.AvaraOkHttpClient; import com.avara.models.viewer.studies.StudyRetrieveByUidParams; import com.avara.models.viewer.studies.StudyRetrieveByUidResponse; public final class Main { private Main() {} public static void main(String[] args) { AvaraClient client = AvaraOkHttpClient.fromEnv(); StudyRetrieveByUidResponse response = client.viewer().studies().retrieveByUid("1.2.840.10008.5.1.4.1.1.2"); } } ```