public interface StudiesApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<Message> |
addStudySponsor(String studyId,
String orgId)
Add this organization as a sponsor
|
retrofit2.Call<VersionHolder> |
createStudy(Study study)
Create a new study
|
retrofit2.Call<Message> |
createStudyActivityEvent(String studyId,
StudyActivityEventRequest studyActivityEventRequest,
Boolean showError,
Boolean updateBursts)
Create a new activity event for the caller in this study.
|
retrofit2.Call<FileRevision> |
createStudyLogo(String studyId,
FileRevision fileRevision)
Create a new study logo handle for uploading a study logo.
|
retrofit2.Call<Message> |
deleteExternalId(String externalId)
Deprecated.
|
retrofit2.Call<Message> |
deleteStudy(String studyId,
Boolean physical)
Delete a study.
|
retrofit2.Call<Message> |
deleteStudyActivityEvent(String studyId,
String eventId,
Boolean showError)
Delete an activity event (for the caller) if it is mutable.
|
retrofit2.Call<Enrollment> |
enrollParticipant(String studyId,
Enrollment enrollment)
Enroll an account in a study as a participant.
|
retrofit2.Call<Study> |
finishStudyLogoUpload(String studyId,
DateTime createdOn)
Confirm with the Bridge server that the logo has been uploaded to S3.
|
retrofit2.Call<EnrollmentDetailList> |
getEnrollments(String studyId,
String enrollmentFilter,
Boolean includeTesters,
Integer offsetBy,
Integer pageSize)
Get the enrollments in this study.
|
retrofit2.Call<OrganizationList> |
getSponsors(String studyId,
Integer offsetBy,
Integer pageSize)
Get the sponsors of this study.
|
retrofit2.Call<StudyList> |
getStudies(Integer offsetBy,
Integer pageSize,
Boolean includeDeleted)
Get a list of the studies in this app
|
retrofit2.Call<Study> |
getStudy(String studyId)
Get a study
Get a study for this app.
|
retrofit2.Call<StudyActivityEventPagedList> |
getStudyActivityEventHistory(String studyId,
String eventId,
Integer offsetBy,
Integer pageSize)
Get the history of past timestamps for this event (for the caller).
|
retrofit2.Call<StudyActivityEventList> |
getStudyActivityEvents(String studyId)
Get the activity events for this study (for the caller).
|
retrofit2.Call<StudyInfo> |
getStudyInfo(String appId,
String studyId)
Get the information on a study that is useful for displaying, selecting, and signing into the study.
|
retrofit2.Call<Exporter3Configuration> |
initExporter3ForStudy(String studyId)
Initializes configs and Synapse resources for Exporter 3.0.
|
retrofit2.Call<Message> |
removeStudySponsor(String studyId,
String orgId)
Remove this organization as a sponsor
|
retrofit2.Call<ExporterSubscriptionResult> |
subscribeToExportNotificationsForStudy(String studyId,
ExporterSubscriptionRequest exporterSubscriptionRequest)
Subscribe to be notified when health data is exported to the study-specific Synapse project.
|
retrofit2.Call<Study> |
transitionStudyToAnalysis(String studyId)
Transition a study’s phase to “analysis.” This can only be done with a study that is currently “in flight.”
|
retrofit2.Call<Study> |
transitionStudyToCompleted(String studyId)
Transition a study’s phase to “completed.” This can only be done with a study that is currently in the “analysis” phase.
|
retrofit2.Call<Study> |
transitionStudyToDesign(String studyId)
Transition a study’s phase to “design.” This can only be done with a study that is currently in the “legacy” phase.
|
retrofit2.Call<Study> |
transitionStudyToInFlight(String studyId)
Transition a study’s phase to “in flight.” This can only be done with a study that is currently in the “recruitment” phase.
|
retrofit2.Call<Study> |
transitionStudyToRecruitment(String studyId)
Transition a study’s phase to “recruitment.” This can only be done with a study that is currently in the “design” phase.
|
retrofit2.Call<Study> |
transitionStudyToWithdrawn(String studyId)
Transition a study’s phase to “withdrawn.” This can be done with a study that is currently in “design,” “recruitment,” “in flight,” or “analysis” phases.
|
retrofit2.Call<Message> |
updateEnrollment(String studyId,
String userId,
Enrollment enrollment)
Update a participant's enrollment record for a study
Developers and Study Designers can only update test accounts.
|
retrofit2.Call<VersionHolder> |
updateStudy(String studyId,
Study study)
Update an existing study
Update an existing study
|
retrofit2.Call<Enrollment> |
withdrawParticipant(String studyId,
String userId,
String withdrawalNote)
Withdraw a participant from the study
|
@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/sponsors/{orgId}") retrofit2.Call<Message> addStudySponsor(@Path(value="studyId") String studyId, @Path(value="orgId") String orgId)
studyId
- Study identifier (required)orgId
- Organization ID (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies") retrofit2.Call<VersionHolder> createStudy(@Body Study study)
study
- New study (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/participants/self/activityevents") retrofit2.Call<Message> createStudyActivityEvent(@Path(value="studyId") String studyId, @Body StudyActivityEventRequest studyActivityEventRequest, @Query(value="showError") Boolean showError, @Query(value="updateBursts") Boolean updateBursts)
studyId
- Study identifier (required)studyActivityEventRequest
- (required)showError
- Return a 400 status if the submission cannot be persisted (optional, default to false)updateBursts
- If this event is an originating event for a study burst, update the study burst events (while following their update type rules) (optional, default to true)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/logo") retrofit2.Call<FileRevision> createStudyLogo(@Path(value="studyId") String studyId, @Body FileRevision fileRevision)
studyId
- Study identifier (required)fileRevision
- New file revision (required)@Deprecated @Headers(value="Content-Type:application/json") @DELETE(value="v4/externalids/{externalId}") retrofit2.Call<Message> deleteExternalId(@Path(value="externalId") String externalId)
externalId
- User's external ID (required)@Headers(value="Content-Type:application/json") @DELETE(value="v5/studies/{studyId}") retrofit2.Call<Message> deleteStudy(@Path(value="studyId") String studyId, @Query(value="physical") Boolean physical)
studyId
- Study identifier (required)physical
- Physically delete this resource? (administrators only; this is always false for developers) (optional, default to false)@Headers(value="Content-Type:application/json") @DELETE(value="v5/studies/{studyId}/participants/self/activityevents/{eventId}") retrofit2.Call<Message> deleteStudyActivityEvent(@Path(value="studyId") String studyId, @Path(value="eventId") String eventId, @Query(value="showError") Boolean showError)
studyId
- Study identifier (required)eventId
- An activity event key (required)showError
- Return a 400 status if the submission cannot be persisted (optional, default to false)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/enrollments") retrofit2.Call<Enrollment> enrollParticipant(@Path(value="studyId") String studyId, @Body Enrollment enrollment)
studyId
- Study identifier (required)enrollment
- Enrollment information for this user (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/logo/{createdOn}") retrofit2.Call<Study> finishStudyLogoUpload(@Path(value="studyId") String studyId, @Path(value="createdOn") DateTime createdOn)
studyId
- Study identifier (required)createdOn
- Created on timestamp (ISO 8601) (required)@Headers(value="Content-Type:application/json") @GET(value="v5/studies/{studyId}/enrollments") retrofit2.Call<EnrollmentDetailList> getEnrollments(@Path(value="studyId") String studyId, @Query(value="enrollmentFilter") String enrollmentFilter, @Query(value="includeTesters") Boolean includeTesters, @Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize)
studyId
- Study identifier (required)enrollmentFilter
- Filter enrollees (optional)includeTesters
- Include accounts with 'test_user' data group (optional, default to false)offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v5/studies/{studyId}/sponsors") retrofit2.Call<OrganizationList> getSponsors(@Path(value="studyId") String studyId, @Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize)
studyId
- Study identifier (required)offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v5/studies") retrofit2.Call<StudyList> getStudies(@Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize, @Query(value="includeDeleted") Boolean includeDeleted)
offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)includeDeleted
- Should deleted items be returned in results? (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v5/studies/{studyId}") retrofit2.Call<Study> getStudy(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @GET(value="v5/studies/{studyId}/participants/self/activityevents/{eventId}") retrofit2.Call<StudyActivityEventPagedList> getStudyActivityEventHistory(@Path(value="studyId") String studyId, @Path(value="eventId") String eventId, @Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize)
studyId
- Study identifier (required)eventId
- An activity event key (required)offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v5/studies/{studyId}/participants/self/activityevents") retrofit2.Call<StudyActivityEventList> getStudyActivityEvents(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @GET(value="v1/apps/{appId}/studies/{studyId}") retrofit2.Call<StudyInfo> getStudyInfo(@Path(value="appId") String appId, @Path(value="studyId") String studyId)
appId
- App ID (required)studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/exporter3") retrofit2.Call<Exporter3Configuration> initExporter3ForStudy(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @DELETE(value="v5/studies/{studyId}/sponsors/{orgId}") retrofit2.Call<Message> removeStudySponsor(@Path(value="studyId") String studyId, @Path(value="orgId") String orgId)
studyId
- Study identifier (required)orgId
- Organization ID (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/exporter3/notifications/export/subscribe") retrofit2.Call<ExporterSubscriptionResult> subscribeToExportNotificationsForStudy(@Path(value="studyId") String studyId, @Body ExporterSubscriptionRequest exporterSubscriptionRequest)
studyId
- Study identifier (required)exporterSubscriptionRequest
- Subscription request attributes. (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/analyze") retrofit2.Call<Study> transitionStudyToAnalysis(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/complete") retrofit2.Call<Study> transitionStudyToCompleted(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/design") retrofit2.Call<Study> transitionStudyToDesign(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/conduct") retrofit2.Call<Study> transitionStudyToInFlight(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/recruit") retrofit2.Call<Study> transitionStudyToRecruitment(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/withdraw") retrofit2.Call<Study> transitionStudyToWithdrawn(@Path(value="studyId") String studyId)
studyId
- Study identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}/enrollments/{userId}") retrofit2.Call<Message> updateEnrollment(@Path(value="studyId") String studyId, @Path(value="userId") String userId, @Body Enrollment enrollment)
studyId
- Study identifier (required)userId
- User ID (required)enrollment
- Updated enrollment (required)@Headers(value="Content-Type:application/json") @POST(value="v5/studies/{studyId}") retrofit2.Call<VersionHolder> updateStudy(@Path(value="studyId") String studyId, @Body Study study)
studyId
- Study identifier (required)study
- Updated study (required)@Headers(value="Content-Type:application/json") @DELETE(value="v5/studies/{studyId}/enrollments/{userId}") retrofit2.Call<Enrollment> withdrawParticipant(@Path(value="studyId") String studyId, @Path(value="userId") String userId, @Query(value="withdrawalNote") String withdrawalNote)
studyId
- Study identifier (required)userId
- User ID (required)withdrawalNote
- The reason given for a user’s withdrawal from a study. (optional)Copyright © 2023 Sage Bionetworks. All rights reserved.