# Cyclos411Api.NotificationsApi

All URIs are relative to *https://138.197.145.149:8080/cyclos/eCloudAtm/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteNotification**](NotificationsApi.md#deleteNotification) | **DELETE** /notifications/{id} | Removes a notification by id.
[**markAsViewed**](NotificationsApi.md#markAsViewed) | **POST** /notifications/viewed | Update the last view date for the notifications.
[**markNotificationsAsRead**](NotificationsApi.md#markNotificationsAsRead) | **POST** /notifications/mark-as-read | Marks a list of notifications as read.
[**notificationsStatus**](NotificationsApi.md#notificationsStatus) | **GET** /notifications/status | Return information about the received notifications.
[**searchNotifications**](NotificationsApi.md#searchNotifications) | **GET** /notifications | Searches for the notifications the authenticated user has received.
[**viewNotification**](NotificationsApi.md#viewNotification) | **GET** /notifications/{id} | Returns the notification details.


<a name="deleteNotification"></a>
# **deleteNotification**
> deleteNotification(id)

Removes a notification by id.

Removes a notification for the authenticated user by id. 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.NotificationsApi();

var id = "id_example"; // String | The object identification


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteNotification(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The object identification | 

### Return type

null (empty response body)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

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

<a name="markAsViewed"></a>
# **markAsViewed**
> markAsViewed()

Update the last view date for the notifications.

Update the last view date for the notifications. This will be used to calculate the number of new notifications returned by the  &#x60;POST /notifications/status&#x60; operation. 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');

var apiInstance = new Cyclos411Api.NotificationsApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.markAsViewed(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="markNotificationsAsRead"></a>
# **markNotificationsAsRead**
> markNotificationsAsRead(ids)

Marks a list of notifications as read.

Marks a list of notifications, given by id, as read.

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');

var apiInstance = new Cyclos411Api.NotificationsApi();

var ids = ["ids_example"]; // [String] | The notifications (comma-separated list of identifiers) to mark as read.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.markNotificationsAsRead(ids, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ids** | [**[String]**](String.md)| The notifications (comma-separated list of identifiers) to mark as read. | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="notificationsStatus"></a>
# **notificationsStatus**
> NotificationsStatus notificationsStatus()

Return information about the received notifications.

Return information about the status of the received notifications (unread, new, etc).

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');

var apiInstance = new Cyclos411Api.NotificationsApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.notificationsStatus(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**NotificationsStatus**](NotificationsStatus.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="searchNotifications"></a>
# **searchNotifications**
> [Notification] searchNotifications(opts)

Searches for the notifications the authenticated user has received.

Returns an ordered page of notifications the authenticated user has received (newest first). 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.NotificationsApi();

var opts = { 
  'fields': ["fields_example"], // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
  'onlyNew': true, // Boolean | Boolean value indicating wether return only the new notifications received after the last view date tracked using `POST /notifications/viewed`  
  'onlyUnread': true, // Boolean | Boolean value indicating wether return only the unread notifications 
  'page': 56, // Number | The page number (zero-based) of the search. The default value is zero. 
  'pageSize': 56 // Number | The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.searchNotifications(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 
 **onlyNew** | **Boolean**| Boolean value indicating wether return only the new notifications received after the last view date tracked using &#x60;POST /notifications/viewed&#x60;   | [optional] 
 **onlyUnread** | **Boolean**| Boolean value indicating wether return only the unread notifications  | [optional] 
 **page** | **Number**| The page number (zero-based) of the search. The default value is zero.  | [optional] 
 **pageSize** | **Number**| The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.  | [optional] 

### Return type

[**[Notification]**](Notification.md)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

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

<a name="viewNotification"></a>
# **viewNotification**
> Notification viewNotification(id, opts)

Returns the notification details.

Returns the notification details.

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');

var apiInstance = new Cyclos411Api.NotificationsApi();

var id = "id_example"; // String | The object identification

var opts = { 
  'fields': ["fields_example"] // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.viewNotification(id, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The object identification | 
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 

### Return type

[**Notification**](Notification.md)

### Authorization

No authorization required

### HTTP request headers

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

