...
Method | Path | Description |
---|---|---|
GET | /v1/messages | Get the messages (paged and filterable by type and whether message has been read) for the caller. |
POST | /v1/messages | Publish a message to all subscribers. |
DELETE | /v1/messages/{guid} | Mark a message as read or resolved (if resolved=true) |
GET | /v1/messages/subscriptions | Get the studies and types of messages you are subscribed to |
POST | /v1/messages/subscriptions/{studyId}/{type} | Subscribe to receive messages of a specific type in a specific study. |
DELETE | /v1/messages/subscriptions/{studyId}/{type} | Unsubscribe from receiving messages of a given type in a given study. |
The objects (subscriptions and message):
Code Block | ||
---|---|---|
| ||
public class Subscription {
String appId;
String studyId;
MessageType messageType;
String recipientId;
}
// As submitted
public class Message {
String studyId;
MessageType messageType;
String text;
}
// As persisted, one message per subscription
public class Message {
String guid;
String appId;
String studyId;
String userId;
MessageType messageType;
String text;
boolean read;
String readBy;
} |