public interface ParticipantsApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<IdentifierHolder> |
createParticipant(SignUp signUp)
Create a new study participant (user)
If the caller is a developer account, then the participant record will automatically be created as a test user (marked with the “test_user” data group).
|
retrofit2.Call<Message> |
deleteParticipant(String userId)
Delete a study participant if the record has the `test_user` data group, or the account has not been used by the participant (the participant has never signed in to Bridge using the account) and it is only enrolled in one study.
|
retrofit2.Call<Message> |
deleteParticipantActivities(String userId)
Deprecated.
|
retrofit2.Call<ForwardCursorScheduledActivityList> |
getParticipantActivityHistory(String userId,
String activityGuid,
DateTime scheduledOnStart,
DateTime scheduledOnEnd,
String offsetKey,
Integer pageSize)
Deprecated.
|
retrofit2.Call<StudyParticipant> |
getParticipantByExternalId(String externalId,
Boolean consents)
Get a study participant (user) record using the external ID of the account
|
retrofit2.Call<StudyParticipant> |
getParticipantByHealthCode(String healthCode,
Boolean consents)
Get a study participant (user) record using the health code of the account
|
retrofit2.Call<StudyParticipant> |
getParticipantById(String userId,
Boolean consents)
Get a study participant (user) record
This endpoint can be called by researchers (all authenticated users can retrieve their own StudyParticipant record by using the `getUsersParticipantRecord` method, which should be used by administrative accounts as well, such as developers).
|
retrofit2.Call<ForwardCursorScheduledActivityList> |
getParticipantCompoundActivityHistory(String userId,
String taskId,
DateTime scheduledOnStart,
DateTime scheduledOnEnd,
String offsetKey,
Integer pageSize)
Deprecated.
|
retrofit2.Call<NotificationRegistrationList> |
getParticipantPushNotificationRegistrations(String userId)
Get a study participant's push notification registrations
Get all of a study participant's registrations for push notifications.
|
retrofit2.Call<RequestInfo> |
getParticipantRequestInfo(String userId)
Get information about the last request made by this participant
Retrieves information about the user agent headers and participant settings that were in effect the last time this participant contacted the Bridge server.
|
retrofit2.Call<AccountSummaryList> |
getParticipants(Integer offsetBy,
Integer pageSize,
String emailFilter,
String phoneFilter,
DateTime startTime,
DateTime endTime)
Get a paged list of study participants (users)
|
retrofit2.Call<ForwardCursorScheduledActivityList> |
getParticipantSurveyHistory(String userId,
String surveyGuid,
DateTime scheduledOnStart,
DateTime scheduledOnEnd,
String offsetKey,
Integer pageSize)
Deprecated.
|
retrofit2.Call<ForwardCursorScheduledActivityList> |
getParticipantTaskHistory(String userId,
String taskId,
DateTime scheduledOnStart,
DateTime scheduledOnEnd,
String offsetKey,
Integer pageSize)
Deprecated.
|
retrofit2.Call<UploadList> |
getParticipantUploads(String userId,
DateTime startTime,
DateTime endTime,
Integer pageSize,
String offsetKey)
Get a study participant's upload history
Retrieve information about the uploads from a user.
|
retrofit2.Call<StudyParticipant> |
getUsersParticipantRecord(Boolean consents)
Get user's participant record
Get the current user's participant record.
|
retrofit2.Call<Message> |
requestParticipantRoster(ParticipantRosterRequest participantRosterRequest)
Request a roster of participants within an app, and optionally within a study if a studyId is provided.
|
retrofit2.Call<Message> |
resendParticipantConsentAgreement(String userId,
String subpopulationGuid)
Re-send the consent agreement for this subpopulation
When called, re-sends a signed consent agreement document to the participant's email address.
|
retrofit2.Call<AccountSummaryList> |
searchAccountSummaries(AccountSummarySearch accountSummarySearch)
Search for account summaries (participants)
For developers, this API only returns test accounts (accounts marked with the “test_user” data group).
|
retrofit2.Call<Message> |
sendInstallLinkMessage(String userId)
Send a message (SMS or email) to a participant explaining how to download and install the app
When called, sends either an SMS message or an email message (depending on whether the account has a verified email address or phone number.
|
retrofit2.Call<Message> |
sendNotificationToParticipant(String userId,
NotificationMessage notificationMessage)
Send a push notification to a single participant
Send a push notification to an individual participant (assuming they have registered for push notifications).
|
retrofit2.Call<Message> |
sendParticipantEmailVerification(String userId)
Resend an email verification email to this user
When called, resends the email to the user's email account, which contains a link they must click on to verify they control that email address.
|
retrofit2.Call<Message> |
sendParticipantPhoneVerification(String userId)
Resend a phone verification to this user
When called, resends the SMS message to the user's email account, which contains a code they must enter into your application to call and verify this phone number.
|
retrofit2.Call<Message> |
sendParticipantResetPassword(String userId)
Trigger a request to reset password for this user
When called, a reset password message will be sent to either the email address or the phone number for this account (preferencing the email address).
|
retrofit2.Call<Message> |
signOutParticipant(String userId,
Boolean deleteReauthToken)
Sign the user out and delete their server session
This endpoint can be called by researchers, and by other administrators for their own account.
|
retrofit2.Call<Message> |
updateParticipant(String userId,
StudyParticipant studyParticipant)
Update an existing study participant (user) record
This endpoint can be called by researchers, and by other administrators for their own account account.
|
retrofit2.Call<UserSessionInfo> |
updateUsersIdentifiers(IdentifierUpdate updateIdentifier)
Allows the caller to add additional identifier fields to an account (email, phone).
|
retrofit2.Call<UserSessionInfo> |
updateUsersParticipantRecord(StudyParticipant studyParticipant)
Update user's participant record
Update the current user's participant record.
|
retrofit2.Call<Message> |
withdrawParticipantFromApp(String userId,
Withdrawal withdrawal)
Withdraw the participant from all studies in this app
Withdraw the user entirely from all studies in this app.
|
retrofit2.Call<Message> |
withdrawParticipantFromSubpopulation(String userId,
String subpopulationGuid,
Withdrawal withdrawal)
Withdraw the participant from the specified subpopulation
This endpoint will withdraw the user from consent to participate in one subpopulation of the app.
|
@Headers(value="Content-Type:application/json") @POST(value="v3/participants") retrofit2.Call<IdentifierHolder> createParticipant(@Body SignUp signUp)
signUp
- Sign up (required)@Headers(value="Content-Type:application/json") @DELETE(value="v3/participants/{userId}") retrofit2.Call<Message> deleteParticipant(@Path(value="userId") String userId)
userId
- User ID (required)@Deprecated @Headers(value="Content-Type:application/json") @DELETE(value="v3/participants/{userId}/activities") retrofit2.Call<Message> deleteParticipantActivities(@Path(value="userId") String userId)
userId
- User ID (required)@Deprecated @Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/activities/{activityGuid}") retrofit2.Call<ForwardCursorScheduledActivityList> getParticipantActivityHistory(@Path(value="userId") String userId, @Path(value="activityGuid") String activityGuid, @Query(value="scheduledOnStart") DateTime scheduledOnStart, @Query(value="scheduledOnEnd") DateTime scheduledOnEnd, @Query(value="offsetKey") String offsetKey, @Query(value="pageSize") Integer pageSize)
userId
- User ID (required)activityGuid
- Activity GUID (required)scheduledOnStart
- Activities returned are at or after the timestamp. If scheduledOnStart is provided, scheduledOnEnd must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)scheduledOnEnd
- Activities returned are at or before the timestamp. If scheduledOnEnd is provided, scheduledOnStart must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)offsetKey
- next page start key for pagination (optional)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/externalId:{externalId}") retrofit2.Call<StudyParticipant> getParticipantByExternalId(@Path(value="externalId") String externalId, @Query(value="consents") Boolean consents)
externalId
- User's external ID (required)consents
- Should consent histories be included with this participant record? (optional)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/healthCode:{healthCode}") retrofit2.Call<StudyParticipant> getParticipantByHealthCode(@Path(value="healthCode") String healthCode, @Query(value="consents") Boolean consents)
healthCode
- User health code (required)consents
- Should consent histories be included with this participant record? (optional)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}") retrofit2.Call<StudyParticipant> getParticipantById(@Path(value="userId") String userId, @Query(value="consents") Boolean consents)
userId
- User ID (required)consents
- Should consent histories be included with this participant record? (optional)@Deprecated @Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/activities/compoundactivities/{taskId}") retrofit2.Call<ForwardCursorScheduledActivityList> getParticipantCompoundActivityHistory(@Path(value="userId") String userId, @Path(value="taskId") String taskId, @Query(value="scheduledOnStart") DateTime scheduledOnStart, @Query(value="scheduledOnEnd") DateTime scheduledOnEnd, @Query(value="offsetKey") String offsetKey, @Query(value="pageSize") Integer pageSize)
userId
- User ID (required)taskId
- Task ID (required)scheduledOnStart
- Activities returned are at or after the timestamp. If scheduledOnStart is provided, scheduledOnEnd must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)scheduledOnEnd
- Activities returned are at or before the timestamp. If scheduledOnEnd is provided, scheduledOnStart must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)offsetKey
- next page start key for pagination (optional)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/notifications") retrofit2.Call<NotificationRegistrationList> getParticipantPushNotificationRegistrations(@Path(value="userId") String userId)
userId
- User ID (required)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/requestInfo") retrofit2.Call<RequestInfo> getParticipantRequestInfo(@Path(value="userId") String userId)
userId
- User ID (required)@Deprecated @Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/activities/surveys/{surveyGuid}") retrofit2.Call<ForwardCursorScheduledActivityList> getParticipantSurveyHistory(@Path(value="userId") String userId, @Path(value="surveyGuid") String surveyGuid, @Query(value="scheduledOnStart") DateTime scheduledOnStart, @Query(value="scheduledOnEnd") DateTime scheduledOnEnd, @Query(value="offsetKey") String offsetKey, @Query(value="pageSize") Integer pageSize)
userId
- User ID (required)surveyGuid
- Survey GUID (required)scheduledOnStart
- Activities returned are at or after the timestamp. If scheduledOnStart is provided, scheduledOnEnd must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)scheduledOnEnd
- Activities returned are at or before the timestamp. If scheduledOnEnd is provided, scheduledOnStart must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)offsetKey
- next page start key for pagination (optional)pageSize
- maximum number of records in each returned page (optional, default to 50)@Deprecated @Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/activities/tasks/{taskId}") retrofit2.Call<ForwardCursorScheduledActivityList> getParticipantTaskHistory(@Path(value="userId") String userId, @Path(value="taskId") String taskId, @Query(value="scheduledOnStart") DateTime scheduledOnStart, @Query(value="scheduledOnEnd") DateTime scheduledOnEnd, @Query(value="offsetKey") String offsetKey, @Query(value="pageSize") Integer pageSize)
userId
- User ID (required)taskId
- Task ID (required)scheduledOnStart
- Activities returned are at or after the timestamp. If scheduledOnStart is provided, scheduledOnEnd must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)scheduledOnEnd
- Activities returned are at or before the timestamp. If scheduledOnEnd is provided, scheduledOnStart must be provided, and vice versa. Default range is 4 days in the future to 10 days in the past. (optional)offsetKey
- next page start key for pagination (optional)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/{userId}/uploads") retrofit2.Call<UploadList> getParticipantUploads(@Path(value="userId") String userId, @Query(value="startTime") DateTime startTime, @Query(value="endTime") DateTime endTime, @Query(value="pageSize") Integer pageSize, @Query(value="offsetKey") String offsetKey)
userId
- User ID (required)startTime
- (required)endTime
- (required)pageSize
- maximum number of records in each returned page (optional, default to 50)offsetKey
- next page start key for pagination (optional)@Headers(value="Content-Type:application/json") @GET(value="v3/participants") retrofit2.Call<AccountSummaryList> getParticipants(@Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize, @Query(value="emailFilter") String emailFilter, @Query(value="phoneFilter") String phoneFilter, @Query(value="startTime") DateTime startTime, @Query(value="endTime") DateTime endTime)
offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)emailFilter
- A string (can be a substring of an email address) to filter returned records against. (optional)phoneFilter
- A string (can be a substring of a phone number) to filter returned records against. (optional)startTime
- The first day to include in reports that are returned (optional)endTime
- The last day to include in reports that are returned (optional)@Headers(value="Content-Type:application/json") @GET(value="v3/participants/self") retrofit2.Call<StudyParticipant> getUsersParticipantRecord(@Query(value="consents") Boolean consents)
consents
- Should consent histories be included with this participant record? (optional)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/emailRoster") retrofit2.Call<Message> requestParticipantRoster(@Body ParticipantRosterRequest participantRosterRequest)
participantRosterRequest
- (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/consents/{subpopulationGuid}/resendConsent") retrofit2.Call<Message> resendParticipantConsentAgreement(@Path(value="userId") String userId, @Path(value="subpopulationGuid") String subpopulationGuid)
userId
- User ID (required)subpopulationGuid
- Subpopulation GUID (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/search") retrofit2.Call<AccountSummaryList> searchAccountSummaries(@Body AccountSummarySearch accountSummarySearch)
accountSummarySearch
- Account summary search parameters (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/sendInstallLink") retrofit2.Call<Message> sendInstallLinkMessage(@Path(value="userId") String userId)
userId
- User ID (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/sendNotification") retrofit2.Call<Message> sendNotificationToParticipant(@Path(value="userId") String userId, @Body NotificationMessage notificationMessage)
userId
- User ID (required)notificationMessage
- (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/resendEmailVerification") retrofit2.Call<Message> sendParticipantEmailVerification(@Path(value="userId") String userId)
userId
- User ID (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/resendPhoneVerification") retrofit2.Call<Message> sendParticipantPhoneVerification(@Path(value="userId") String userId)
userId
- User ID (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/requestResetPassword") retrofit2.Call<Message> sendParticipantResetPassword(@Path(value="userId") String userId)
userId
- User ID (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/signOut") retrofit2.Call<Message> signOutParticipant(@Path(value="userId") String userId, @Query(value="deleteReauthToken") Boolean deleteReauthToken)
userId
- User ID (required)deleteReauthToken
- Should sign out also delete any extant reauthentication tokens? (optional, default to true)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}") retrofit2.Call<Message> updateParticipant(@Path(value="userId") String userId, @Body StudyParticipant studyParticipant)
userId
- User ID (required)studyParticipant
- Study participant (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/self/identifiers") retrofit2.Call<UserSessionInfo> updateUsersIdentifiers(@Body IdentifierUpdate updateIdentifier)
updateIdentifier
- Information to authenticate and update an account identifier (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/self") retrofit2.Call<UserSessionInfo> updateUsersParticipantRecord(@Body StudyParticipant studyParticipant)
studyParticipant
- Study participant (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/consents/withdraw") retrofit2.Call<Message> withdrawParticipantFromApp(@Path(value="userId") String userId, @Body Withdrawal withdrawal)
userId
- User ID (required)withdrawal
- (required)@Headers(value="Content-Type:application/json") @POST(value="v3/participants/{userId}/consents/{subpopulationGuid}/withdraw") retrofit2.Call<Message> withdrawParticipantFromSubpopulation(@Path(value="userId") String userId, @Path(value="subpopulationGuid") String subpopulationGuid, @Body Withdrawal withdrawal)
userId
- User ID (required)subpopulationGuid
- Subpopulation GUID (required)withdrawal
- (required)Copyright © 2023 Sage Bionetworks. All rights reserved.