public interface NotificationsApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<GuidHolder> |
createNotificationTopic(NotificationTopic notificationTopic)
Create a notification topic
Create a notification topic.
|
retrofit2.Call<Message> |
deleteNotificationTopic(String guid,
Boolean physical)
Delete a notification topic
|
retrofit2.Call<NotificationTopic> |
getNotificationTopic(String guid)
Get a notification topic
|
retrofit2.Call<NotificationTopicList> |
getNotificationTopics(Boolean includeDeleted)
Get all the notification topics in this app
Return all the topics defined for this app.
|
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<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> |
sendNotificationToTopic(String guid,
NotificationMessage notificationMessage)
Send a push notification to all topic subscribers
|
retrofit2.Call<GuidHolder> |
updateNotificationTopic(String guid,
NotificationTopic notificationTopic)
Update a notification topic
|
@Headers(value="Content-Type:application/json") @POST(value="v3/topics") retrofit2.Call<GuidHolder> createNotificationTopic(@Body NotificationTopic notificationTopic)
notificationTopic
- (required)@Headers(value="Content-Type:application/json") @DELETE(value="v3/topics/{guid}") retrofit2.Call<Message> deleteNotificationTopic(@Path(value="guid") String guid, @Query(value="physical") Boolean physical)
guid
- A guid (required)physical
- Physically delete this resource? (administrators only; this is always false for developers) (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v3/topics/{guid}") retrofit2.Call<NotificationTopic> getNotificationTopic(@Path(value="guid") String guid)
guid
- A guid (required)@Headers(value="Content-Type:application/json") @GET(value="v3/topics") retrofit2.Call<NotificationTopicList> getNotificationTopics(@Query(value="includeDeleted") Boolean includeDeleted)
includeDeleted
- Should deleted items be returned in results? (optional, default to false)@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") @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/topics/{guid}/sendNotification") retrofit2.Call<Message> sendNotificationToTopic(@Path(value="guid") String guid, @Body NotificationMessage notificationMessage)
guid
- A guid (required)notificationMessage
- (required)@Headers(value="Content-Type:application/json") @POST(value="v3/topics/{guid}") retrofit2.Call<GuidHolder> updateNotificationTopic(@Path(value="guid") String guid, @Body NotificationTopic notificationTopic)
guid
- A guid (required)notificationTopic
- (required)Copyright © 2023 Sage Bionetworks. All rights reserved.