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 |
Task createTask(userId, body)
Creates a new task
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.TasksApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Task(); // Task | Task object that needs to be created
apiInstance.createTask(userId, body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Task | Task object that needs to be created |
- Content-Type: application/json
- Accept: application/json
deleteTaskById(userId, taskId)
Delete task by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.TasksApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var taskId = "taskId_example"; // String | ObjectId of task to be deleted
apiInstance.deleteTaskById(userId, taskId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
taskId | String | ObjectId of task to be deleted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
[Task] getAllTasks(userId, email)
Get all tasks
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.TasksApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the task
apiInstance.getAllTasks(userId, email).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
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
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.TasksApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var taskId = "taskId_example"; // String | ObjectId of task
apiInstance.getTaskById(userId, taskId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
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, taskId)
Update task by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.TasksApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Task(); // Task | Task object that needs to be updated
var taskId = "taskId_example"; // String | ObjectId of task to be deleted
apiInstance.updateTaskById(userId, body, taskId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Task | Task object that needs to be updated | |
taskId | String | ObjectId of task to be deleted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json