All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
fetchMessages | GET /messages | |
getLastMessageId | GET /messages/last_id | |
sendMessages | POST /messages |
List<MessageEachResponse> fetchMessages(offset, limit, resourceUris)
Fetch messages
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.MessagesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
MessagesApi apiInstance = new MessagesApi();
Long offset = 789L; // Long | Offset (Greater than or equal to) ID for Messages to list from
Long limit = 789L; // Long | Number of limits
String resourceUris = "resourceUris_example"; // String | URIs of Resource
try {
List<MessageEachResponse> result = apiInstance.fetchMessages(offset, limit, resourceUris);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagesApi#fetchMessages");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
offset | Long | Offset (Greater than or equal to) ID for Messages to list from | |
limit | Long | Number of limits | [optional] |
resourceUris | String | URIs of Resource | [optional] |
- Content-Type: application/json
- Accept: application/json
LastMessageIdResponse getLastMessageId()
Get the current last message id which would be used as a first offset to fetch messages
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.MessagesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
MessagesApi apiInstance = new MessagesApi();
try {
LastMessageIdResponse result = apiInstance.getLastMessageId();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagesApi#getLastMessageId");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
BulkinsertResponse sendMessages(messages)
Enqueues new messages
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.MessagesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
MessagesApi apiInstance = new MessagesApi();
List<MessageRequest> messages = Arrays.asList(new MessageRequest()); // List<MessageRequest> | Messages to enqueue
try {
BulkinsertResponse result = apiInstance.sendMessages(messages);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagesApi#sendMessages");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
messages | List<MessageRequest> | Messages to enqueue |
- Content-Type: application/json
- Accept: application/json