All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createTask | POST /{userId}/tasks | Creates a new task |
deleteTaskById | DELETE /{userId}/tasks/{taskId} | Delete task by Id |
getAllTasks | GET /{userId}/tasks | Get all tasks |
getTaskById | GET /{userId}/tasks/{taskId} | Get task by Id |
updateTaskById | PUT /{userId}/tasks/{taskId} | Update task by Id |
createTask(userId, body)
Creates a new task
// Import classes:
//import crms.ApiClient;
//import crms.ApiException;
//import crms.Configuration;
//import crms.auth.*;
//import saasgrids.TasksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
TasksApi apiInstance = new TasksApi();
String userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
Task body = new Task(); // Task | Task object that needs to be created
try {
apiInstance.createTask(userId, body);
} catch (ApiException e) {
System.err.println("Exception when calling TasksApi#createTask");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Task | Task object that needs to be created |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteTaskById(userId)
Delete task by Id
// Import classes:
//import crms.ApiClient;
//import crms.ApiException;
//import crms.Configuration;
//import crms.auth.*;
//import saasgrids.TasksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
TasksApi apiInstance = new TasksApi();
String userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
try {
apiInstance.deleteTaskById(userId);
} catch (ApiException e) {
System.err.println("Exception when calling TasksApi#deleteTaskById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
List<Task> getAllTasks(userId, email)
Get all tasks
// Import classes:
//import crms.ApiClient;
//import crms.ApiException;
//import crms.Configuration;
//import crms.auth.*;
//import saasgrids.TasksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
TasksApi apiInstance = new TasksApi();
String userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
String email = "email_example"; // String | Email id of the task
try {
List<Task> result = apiInstance.getAllTasks(userId, email);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TasksApi#getAllTasks");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
String | Email id of the task |
- Content-Type: application/json
- Accept: application/json
Task getTaskById(userId, taskId)
Get task by Id
// Import classes:
//import crms.ApiClient;
//import crms.ApiException;
//import crms.Configuration;
//import crms.auth.*;
//import saasgrids.TasksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
TasksApi apiInstance = new TasksApi();
String userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
String taskId = "taskId_example"; // String | ObjectId of task
try {
Task result = apiInstance.getTaskById(userId, taskId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TasksApi#getTaskById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
taskId | String | ObjectId of task |
- Content-Type: application/json
- Accept: application/json
updateTaskById(userId, body)
Update task by Id
// Import classes:
//import crms.ApiClient;
//import crms.ApiException;
//import crms.Configuration;
//import crms.auth.*;
//import saasgrids.TasksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
TasksApi apiInstance = new TasksApi();
String userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
Task body = new Task(); // Task | Task object that needs to be updated
try {
apiInstance.updateTaskById(userId, body);
} catch (ApiException e) {
System.err.println("Exception when calling TasksApi#updateTaskById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Task | Task object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json