All Downloads are FREE. Search and download functionalities are using the official Maven repository.

docs.MessagesApi.md Maven / Gradle / Ivy

There is a newer version: 1.50.1
Show newest version
# MessagesApi

All URIs are relative to *https://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**v1MessageImportPost**](MessagesApi.md#v1MessageImportPost) | **POST** /v1/message/import | Import messages from other systems into Symphony.
[**v1StreamSidMessageCreatePost**](MessagesApi.md#v1StreamSidMessageCreatePost) | **POST** /v1/stream/{sid}/message/create | Post a message to one existing stream.
[**v1StreamSidMessageGet**](MessagesApi.md#v1StreamSidMessageGet) | **GET** /v1/stream/{sid}/message | Get messages from an existing stream.
[**v2MessageImportPost**](MessagesApi.md#v2MessageImportPost) | **POST** /v2/message/import | Import messages from other systems into Symphony.
[**v2StreamSidMessageCreatePost**](MessagesApi.md#v2StreamSidMessageCreatePost) | **POST** /v2/stream/{sid}/message/create | Post a message to one existing stream.
[**v2StreamSidMessageGet**](MessagesApi.md#v2StreamSidMessageGet) | **GET** /v2/stream/{sid}/message | Get messages from an existing stream.



# **v1MessageImportPost**
> ImportResponseList v1MessageImportPost(sessionToken, keyManagerToken, messageList)

Import messages from other systems into Symphony.

Sends a message to be imported into the system. Allows you to override the timestamp and author of the message with your desired values. The requesting user must have the Content Management role. Also, the requesting user must be a member of the conversation it is importing into. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. 

### Example
```java
// Import classes:
//import org.symphonyoss.symphony.agent.invoker.ApiException;
//import org.symphonyoss.symphony.agent.api.MessagesApi;


MessagesApi apiInstance = new MessagesApi();
String sessionToken = "sessionToken_example"; // String | Session authentication token.
String keyManagerToken = "keyManagerToken_example"; // String | Key Manager authentication token.
MessageImportList messageList = new MessageImportList(); // MessageImportList | 
try {
    ImportResponseList result = apiInstance.v1MessageImportPost(sessionToken, keyManagerToken, messageList);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling MessagesApi#v1MessageImportPost");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sessionToken** | **String**| Session authentication token. |
 **keyManagerToken** | **String**| Key Manager authentication token. |
 **messageList** | [**MessageImportList**](MessageImportList.md)|  |

### Return type

[**ImportResponseList**](ImportResponseList.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


# **v1StreamSidMessageCreatePost**
> Message v1StreamSidMessageCreatePost(sid, sessionToken, keyManagerToken, message)

Post a message to one existing stream.

Post a new message to the given stream. The stream can be a chatroom, an IM or a multiparty IM.  If the message parameter type is TEXT then the message contains plain text and cannot include formating, hash tags, mentions etc.  If the message parameter type is MessageML then the message contains MessageML which allows for these entities.  If the message is in MessageML and fails schema validation a client error results  If the message is sent then 200 is returned. 

### Example
```java
// Import classes:
//import org.symphonyoss.symphony.agent.invoker.ApiException;
//import org.symphonyoss.symphony.agent.api.MessagesApi;


MessagesApi apiInstance = new MessagesApi();
String sid = "sid_example"; // String | Stream ID
String sessionToken = "sessionToken_example"; // String | Session authentication token.
String keyManagerToken = "keyManagerToken_example"; // String | Key Manager authentication token.
MessageSubmission message = new MessageSubmission(); // MessageSubmission | 
try {
    Message result = apiInstance.v1StreamSidMessageCreatePost(sid, sessionToken, keyManagerToken, message);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling MessagesApi#v1StreamSidMessageCreatePost");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sid** | **String**| Stream ID |
 **sessionToken** | **String**| Session authentication token. |
 **keyManagerToken** | **String**| Key Manager authentication token. |
 **message** | [**MessageSubmission**](MessageSubmission.md)|  |

### Return type

[**Message**](Message.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


# **v1StreamSidMessageGet**
> MessageList v1StreamSidMessageGet(sid, since, sessionToken, keyManagerToken, offset, maxMessages)

Get messages from an existing stream.

A caller can fetch all unseen messages by passing the timestamp of the last message seen as the since parameter and the number of messages with the same timestamp value already seen as the skip parameter. This means that every message will be seen exactly once even in the case that an additional message is processed with the same timestamp as the last message returned by the previous call, and the case where there are more than maxMessages with the same timestamp value.  This method is intended for historic queries and is generally reliable but if guaranteed delivery of every message in real time is required then the equivilent datafeed method should be called. 

### Example
```java
// Import classes:
//import org.symphonyoss.symphony.agent.invoker.ApiException;
//import org.symphonyoss.symphony.agent.api.MessagesApi;


MessagesApi apiInstance = new MessagesApi();
String sid = "sid_example"; // String | Stream ID 
Long since = 789L; // Long | Timestamp of first required message.  This is a long integer value representing milliseconds since Jan 1 1970 
String sessionToken = "sessionToken_example"; // String | Session authentication token.
String keyManagerToken = "keyManagerToken_example"; // String | Key Manager authentication token.
Integer offset = 56; // Integer | No. of messages to skip. 
Integer maxMessages = 56; // Integer | Max No. of messages to return. If no value is provided, 50 is the default. 
try {
    MessageList result = apiInstance.v1StreamSidMessageGet(sid, since, sessionToken, keyManagerToken, offset, maxMessages);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling MessagesApi#v1StreamSidMessageGet");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sid** | **String**| Stream ID  |
 **since** | **Long**| Timestamp of first required message.  This is a long integer value representing milliseconds since Jan 1 1970  |
 **sessionToken** | **String**| Session authentication token. |
 **keyManagerToken** | **String**| Key Manager authentication token. |
 **offset** | **Integer**| No. of messages to skip.  | [optional]
 **maxMessages** | **Integer**| Max No. of messages to return. If no value is provided, 50 is the default.  | [optional]

### Return type

[**MessageList**](MessageList.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


# **v2MessageImportPost**
> V2ImportResponseList v2MessageImportPost(sessionToken, keyManagerToken, messageList)

Import messages from other systems into Symphony.

Sends a message to be imported into the system. Allows you to override the timestamp and author of the message with your desired values. The requesting user must have the Content Management role. Also, the requesting user must be a member of the conversation it is importing into. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. Optionally the original message ID can be specified to identify the imported message for the purpose of repeat imports. 

### Example
```java
// Import classes:
//import org.symphonyoss.symphony.agent.invoker.ApiException;
//import org.symphonyoss.symphony.agent.api.MessagesApi;


MessagesApi apiInstance = new MessagesApi();
String sessionToken = "sessionToken_example"; // String | Session authentication token.
String keyManagerToken = "keyManagerToken_example"; // String | Key Manager authentication token.
V2MessageImportList messageList = new V2MessageImportList(); // V2MessageImportList | 
try {
    V2ImportResponseList result = apiInstance.v2MessageImportPost(sessionToken, keyManagerToken, messageList);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling MessagesApi#v2MessageImportPost");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sessionToken** | **String**| Session authentication token. |
 **keyManagerToken** | **String**| Key Manager authentication token. |
 **messageList** | [**V2MessageImportList**](V2MessageImportList.md)|  |

### Return type

[**V2ImportResponseList**](V2ImportResponseList.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


# **v2StreamSidMessageCreatePost**
> V2Message v2StreamSidMessageCreatePost(sid, sessionToken, keyManagerToken, message)

Post a message to one existing stream.

Post a new message to the given stream. The stream can be a chatroom, an IM or a multiparty IM.  You may include an attachment on the message (see the V2MessageSubmission parameter).  If the message parameter type is TEXT then the message contains plain text and cannot include formating, hash tags, mentions etc.  If the message parameter type is MessageML then the message contains MessageML which allows for these entities.  If the message is in MessageML and fails schema validation a client error results  If the message is sent then 200 is returned. 

### Example
```java
// Import classes:
//import org.symphonyoss.symphony.agent.invoker.ApiException;
//import org.symphonyoss.symphony.agent.api.MessagesApi;


MessagesApi apiInstance = new MessagesApi();
String sid = "sid_example"; // String | Stream ID
String sessionToken = "sessionToken_example"; // String | Session authentication token.
String keyManagerToken = "keyManagerToken_example"; // String | Key Manager authentication token.
V2MessageSubmission message = new V2MessageSubmission(); // V2MessageSubmission | 
try {
    V2Message result = apiInstance.v2StreamSidMessageCreatePost(sid, sessionToken, keyManagerToken, message);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling MessagesApi#v2StreamSidMessageCreatePost");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sid** | **String**| Stream ID |
 **sessionToken** | **String**| Session authentication token. |
 **keyManagerToken** | **String**| Key Manager authentication token. |
 **message** | [**V2MessageSubmission**](V2MessageSubmission.md)|  |

### Return type

[**V2Message**](V2Message.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


# **v2StreamSidMessageGet**
> V2MessageList v2StreamSidMessageGet(sid, since, sessionToken, keyManagerToken, offset, limit)

Get messages from an existing stream.

A caller can fetch all unseen messages by passing the timestamp of the last message seen as the since parameter and the number of messages with the same timestamp value already seen as the skip parameter. This means that every message will be seen exactly once even in the case that an additional message is processed with the same timestamp as the last message returned by the previous call, and the case where there are more than maxMessages with the same timestamp value.  This method is intended for historic queries and is generally reliable but if guaranteed delivery of every message in real time is required then the equivilent datafeed method should be called. 

### Example
```java
// Import classes:
//import org.symphonyoss.symphony.agent.invoker.ApiException;
//import org.symphonyoss.symphony.agent.api.MessagesApi;


MessagesApi apiInstance = new MessagesApi();
String sid = "sid_example"; // String | Stream ID 
Long since = 789L; // Long | Timestamp of first required message.  This is a long integer value representing milliseconds since Jan 1 1970 
String sessionToken = "sessionToken_example"; // String | Session authentication token.
String keyManagerToken = "keyManagerToken_example"; // String | Key Manager authentication token.
Integer offset = 56; // Integer | No. of messages to skip. 
Integer limit = 56; // Integer | Max No. of messages to return. If no value is provided, 50 is the default. 
try {
    V2MessageList result = apiInstance.v2StreamSidMessageGet(sid, since, sessionToken, keyManagerToken, offset, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling MessagesApi#v2StreamSidMessageGet");
    e.printStackTrace();
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sid** | **String**| Stream ID  |
 **since** | **Long**| Timestamp of first required message.  This is a long integer value representing milliseconds since Jan 1 1970  |
 **sessionToken** | **String**| Session authentication token. |
 **keyManagerToken** | **String**| Key Manager authentication token. |
 **offset** | **Integer**| No. of messages to skip.  | [optional]
 **limit** | **Integer**| Max No. of messages to return. If no value is provided, 50 is the default.  | [optional]

### Return type

[**V2MessageList**](V2MessageList.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json





© 2015 - 2024 Weber Informatics LLC | Privacy Policy