Whispir Platform API
- API version: 1.0.0
- Build date: 2022-09-14T10:37:13.711751+10:00[Australia/Melbourne]
Whispir Platform API for cross channel and multi channel communications. Documentation on each endpoint is available at https://developers.whispir.com.
For more information, please visit https://www.whispir.com/support
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
./gradlew clean build
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
./gradlew publishToMavenLocal
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.whispir</groupId>
<artifactId>whispir-java</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'whispir-java' jar has been published to maven central.
mavenLocal() // Needed if the 'whispir-java' jar has been published to the local maven repo.
}
dependencies {
implementation "com.whispir:whispir-java:1.0.0"
}
At first generate the JAR by executing:
./gradlew assemble
Then manually install the following JARs:
target/whispir-java-1.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import whispir_sdk_java.ApiClient;
import whispir_sdk_java.ApiException;
import whispir_sdk_java.Configuration;
import whispir_sdk_java.auth.*;
import whispir_sdk_java.models.*;
import org.whispir.api.ActivitiesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.au.whispir.com");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
ActivitiesApi apiInstance = new ActivitiesApi(defaultClient);
String xApiKey = "xApiKey_example"; // String | The API key for authentication.
String accept = "application/vnd.whispir.activity-v1+json"; // String | Application specific mime-type.
BigDecimal limit = new BigDecimal("20"); // BigDecimal | The number of records to be returned.
BigDecimal offset = new BigDecimal("0"); // BigDecimal | The record number to start returning from.
String sortOrder = "asc"; // String | The order in which you require the results to be returned. Either ‘asc’ or ‘desc’
String sortFields = "lastName,jobTitle"; // String | The fields that you require the ordering to be performed on. Multiple fields can be provided, separated by a comma.
String action = "Create"; // String | /activities?action=Map
String module = "System"; // String | /activities?module=Message
String user = "james"; // String | /activities?user=james
String workspace = "{{workspaceName}}"; // String | /activities?workspace=Whispir.
String status = "Successful"; // String | /activities?status=Successful
String description = "Sample Activity"; // String | /activities?description=Imported
String startTime = "{{startTime}}"; // String | The date and time to start searching from in the format:dd/mm/yyyy hh:mm. This will search on the `time` field <p>/activities?startTime=01/01/2015%2000:00</p>
String endTime = "{{endTime}}"; // String | The date and time to start searching from in the format:dd/mm/yyyy hh:mm <p>/activities?endTime=01/01/2015%2000:00</p>
try {
GetActivities200Response result = apiInstance.getActivities(xApiKey, accept, limit, offset, sortOrder, sortFields, action, module, user, workspace, status, description, startTime, endTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ActivitiesApi#getActivities");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://api.au.whispir.com
Class | Method | HTTP request | Description |
---|---|---|---|
ActivitiesApi | getActivities | GET /activities | List activities |
ActivitiesApi | getWorkspaceActivities | GET /workspaces/{workspaceId}/activities | List workspace activities |
ActivitiesApi | postActivities | POST /activities | Create an activity |
AuthApi | getAuthVerification | GET /auth/verify | Verify an auth token |
AuthApi | postAuth | POST /auth | Create an auth token |
CallbacksApi | deleteCallbackById | DELETE /callbacks/{callbackId} | Delete a callback |
CallbacksApi | getCallbackById | GET /callbacks/{callbackId} | Get a callback |
CallbacksApi | getCallbackInstances | GET /callbacks/{callbackId}/calls | List callback instances |
CallbacksApi | getCallbacks | GET /callbacks | List callbacks |
CallbacksApi | postCallbacks | POST /callbacks | Create a callback |
CallbacksApi | putCallbackById | PUT /callbacks/{callbackId} | Update a callback |
CallbacksApi | putCallbackInstanceStatus | PUT /callbacks/{callbackId}/calls | Update a callback instance status |
ContactsApi | deleteContactsById | DELETE /workspaces/{workspaceId}/contacts/{contactId} | Delete a contact |
ContactsApi | getContacts | GET /workspaces/{workspaceId}/contacts | List contacts |
ContactsApi | getContactsById | GET /workspaces/{workspaceId}/contacts/{contactId} | Retrieve a contact |
ContactsApi | postContacts | POST /workspaces/{workspaceId}/contacts | Create a contact |
ContactsApi | putContactsById | PUT /workspaces/{workspaceId}/contacts/{contactId} | Update a contact |
CustomListsApi | getCustomLists | GET /customlists | List custom lists |
CustomListsApi | getCustomListsById | GET /customlists/{customlistId} | Retrieve a custom list |
DistributionListsApi | deleteDistributionListsById | DELETE /workspaces/{workspaceId}/distributionlists/{distributionlistId} | Delete a distribution list |
DistributionListsApi | getDistributionLists | GET /workspaces/{workspaceId}/distributionlists | List distribution lists |
DistributionListsApi | getDistributionListsById | GET /workspaces/{workspaceId}/distributionlists/{distributionlistId} | Retrieve a distribution list |
DistributionListsApi | postDistributionLists | POST /workspaces/{workspaceId}/distributionlists | Create a distribution list |
DistributionListsApi | putDistributionListsById | PUT /workspaces/{workspaceId}/distributionlists/{distributionlistId} | Update a distribution list |
EventsApi | createEvent | POST /workspaces/{workspaceId}/events | Create an event |
EventsApi | getEventById | GET /workspaces/{workspaceId}/events/{eventId} | Retrieve an event |
EventsApi | getEvents | GET /workspaces/{workspaceId}/events | List events |
EventsApi | putEventById | PUT /workspaces/{workspaceId}/events/{eventId} | Update an event |
ImportsApi | postImports | POST /workspaces/{workspaceId}/imports | Create an import |
MessagesApi | getMessageById | GET /workspaces/{workspaceId}/messages/{messageId} | Retrieve a message |
MessagesApi | getMessageResponsesById | GET /workspaces/{workspaceId}/messages/{messageId}/messageresponses | Retrieve a message response |
MessagesApi | getMessageStatus | GET /workspaces/{workspaceId}/messages/{messageId}/messagestatus | Retrieve a message status |
MessagesApi | getMessages | GET /workspaces/{workspaceId}/messages | List messages |
MessagesApi | postMessages | POST /workspaces/{workspaceId}/messages | Send a message |
ResourcesApi | deleteResourcesById | DELETE /workspaces/{workspaceId}/resources/{resourceId} | Delete a resource |
ResourcesApi | getResources | GET /workspaces/{workspaceId}/resources | List resources |
ResourcesApi | getResourcesById | GET /workspaces/{workspaceId}/resources/{resourceId} | Retrieve a resource |
ResourcesApi | postResources | POST /workspaces/{workspaceId}/resources | Create a resource |
ResourcesApi | putResourcesById | PUT /workspaces/{workspaceId}/resources/{resourceId} | Update a resource |
ResponseRulesApi | deleteResponseRulesById | DELETE /workspaces/{workspaceId}/responserules/{responseRuleId} | Delete a response rule |
ResponseRulesApi | getResponseRules | GET /workspaces/{workspaceId}/responserules | List response rules |
ResponseRulesApi | getResponseRulesById | GET /workspaces/{workspaceId}/responserules/{responseRuleId} | Retrieve a response rule |
ResponseRulesApi | postResponseRules | POST /workspaces/{workspaceId}/responserules | Create a response rule |
ResponseRulesApi | putResponseRulesById | PUT /workspaces/{workspaceId}/responserules/{responseRuleId} | Update a response rule |
ScenariosApi | deleteScenariosById | DELETE /workspaces/{workspaceId}/scenarios/{scenarioId} | Delete a scenario |
ScenariosApi | getScenarios | GET /workspaces/{workspaceId}/scenarios | List scenarios |
ScenariosApi | getScenariosById | GET /workspaces/{workspaceId}/scenarios/{scenarioId} | Retrieve a scenario |
ScenariosApi | postScenarios | POST /workspaces/{workspaceId}/scenarios | Create a scenario |
ScenariosApi | postScenariosById | POST /workspaces/{workspaceId}/scenarios/{scenarioId} | Run a scenario |
ScenariosApi | putScenariosById | PUT /workspaces/{workspaceId}/scenarios/{scenarioId} | Update a scenario |
TemplatesApi | deleteTemplatesById | DELETE /workspaces/{workspaceId}/templates/{templateId} | Delete a template |
TemplatesApi | getTemplates | GET /workspaces/{workspaceId}/templates | List templates |
TemplatesApi | getTemplatesById | GET /workspaces/{workspaceId}/templates/{templateId} | Retrieve a template |
TemplatesApi | postTemplates | POST /workspaces/{workspaceId}/templates | Create a template |
TemplatesApi | putTemplatesById | PUT /workspaces/{workspaceId}/templates/{templateId} | Update a template |
UsersApi | deleteUsers | DELETE /users | Delete all users |
UsersApi | deleteUsersById | DELETE /users/{userId} | Delete a user |
UsersApi | getUsers | GET /users | List users |
UsersApi | getUsersById | GET /users/{userId} | Retrieve a user |
UsersApi | getWorkspaceUsers | GET /workspaces/{workspaceId}/users | List workspace users |
UsersApi | postUsers | POST /users | Create a user |
UsersApi | putUsersById | PUT /users/{userId} | Update a user |
WorkspacesApi | getWorkspaces | GET /workspaces | List workspaces |
WorkspacesApi | getWorkspacesById | GET /workspaces/{workspaceId} | Retrieve a workspace |
WorkspacesApi | postWorkspaces | POST /workspaces | Create a workspace |
WorkspacesApi | putWorkspaceById | PUT /workspaces/{workspaceId} | Update a workspace |
- Activity
- Attachment
- Callback
- CallbackAuth
- CallbackCallbacks
- CallbackInstance
- CallbackInstanceCallback
- CallbackInstanceFrom
- CallbackInstanceResponseMessage
- Contact
- CustomList
- CustomListCustomlabellistsInner
- Distributionlist
- DistributionlistDistlistdetailsInner
- Dlr
- Dynamicdistributionlist
- EmailResources
- Event
- EventEventFormListInner
- EventEventFormListInnerEventFieldListInner
- Features
- FeaturesAliasOption
- FeaturesPushOptions
- FeaturesPushOptionsApns
- FeaturesPushOptionsFcm
- FieldMapping
- GetActivities200Response
- GetCallbackInstances200Response
- GetCallbacks200Response
- GetCallbacks200ResponseCallbacksInner
- GetContacts200Response
- GetCustomLists200Response
- GetDistributionLists200Response
- GetDistributionLists200ResponseDistributionLists
- GetEvents200Response
- GetMessageResponsesById200Response
- GetMessages200Response
- GetMessages400Response
- GetMessages401Response
- GetMessages403Response
- GetMessages404Response
- GetMessages405Response
- GetMessages415Response
- GetMessages422Response
- GetMessages500Response
- GetMessages501Response
- GetResources200Response
- GetScenarios200Response
- GetTemplates200Response
- GetTemplates200ResponseMessagetemplatesInner
- GetUsers200Response
- GetWorkspaces200Response
- LinkInner
- ListUsers
- LocationsInner
- Message
- MessageResponseDetailed
- MessageResponseDetailedMessageresponsesInner
- MessageResponseDetailedMessageresponsesInnerFrom
- MessageResponseDetailedMessageresponsesInnerResponseMessage
- MessageResponseSummary
- MessageResponseSummaryMessageresponsesInner
- MessageStatus
- MessageStatusMessageStatusesInner
- MessageStatusMessageStatusesInnerCategoriesInner
- MessageStatusMessageStatusesInnerStatusInner
- MessagingoptionsInner
- ModelImport
- PostAuth200Response
- PutCallbackInstanceStatusRequest
- Resource
- ResponseRule
- ResponseTemplatePattern
- Scenario
- Social
- SocialSocialInner
- Template
- User
- Voice
- VoiceResources
- Web
- Workspace
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Api-Key
- Location: HTTP header
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.