# WeaviateApi.EventsApi

All URIs are relative to *https://localhost/weaviate/v1-alpha*

Method | HTTP request | Description
------------- | ------------- | -------------
[**weaveEventsDeleteAll**](EventsApi.md#weaveEventsDeleteAll) | **POST** /events/deleteAll | 
[**weaveEventsList**](EventsApi.md#weaveEventsList) | **GET** /events | 
[**weaveEventsRecordDeviceEvents**](EventsApi.md#weaveEventsRecordDeviceEvents) | **POST** /events/recordDeviceEvents | 


<a name="weaveEventsDeleteAll"></a>
# **weaveEventsDeleteAll**
> weaveEventsDeleteAll(opts)



Deletes all events associated with a particular device. Leaves an event to indicate deletion happened.

### Example
```javascript
var WeaviateApi = require('weaviate_api');

var apiInstance = new WeaviateApi.EventsApi();

var opts = { 
  'alt': "json", // String | Data format for the response.
  'fields': "fields_example", // String | Selector specifying which fields to include in a partial response.
  'key': "key_example", // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  'oauthToken': "oauthToken_example", // String | OAuth 2.0 token for the current user.
  'prettyPrint': true, // Boolean | Returns response with indentations and line breaks.
  'quotaUser': "quotaUser_example", // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
  'userIp': "userIp_example", // String | IP address of the site where the request originates. Use this if you want to enforce per-user limits.
  'hl': "hl_example", // String | Specifies the language code that should be used for text values in the API response.
  'body': new WeaviateApi.EventsDeleteAllRequest() // EventsDeleteAllRequest | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **alt** | **String**| Data format for the response. | [optional] [default to json]
 **fields** | **String**| Selector specifying which fields to include in a partial response. | [optional] 
 **key** | **String**| API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | [optional] 
 **oauthToken** | **String**| OAuth 2.0 token for the current user. | [optional] 
 **prettyPrint** | **Boolean**| Returns response with indentations and line breaks. | [optional] [default to true]
 **quotaUser** | **String**| Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. | [optional] 
 **userIp** | **String**| IP address of the site where the request originates. Use this if you want to enforce per-user limits. | [optional] 
 **hl** | **String**| Specifies the language code that should be used for text values in the API response. | [optional] 
 **body** | [**EventsDeleteAllRequest**](EventsDeleteAllRequest.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json, application/protobuf, application/xml
 - **Accept**: application/json, application/protobuf, application/xml

<a name="weaveEventsList"></a>
# **weaveEventsList**
> EventsListResponse weaveEventsList(opts)



Lists events.

### Example
```javascript
var WeaviateApi = require('weaviate_api');
var defaultClient = WeaviateApi.ApiClient.default;

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

var apiInstance = new WeaviateApi.EventsApi();

var opts = { 
  'alt': "json", // String | Data format for the response.
  'fields': "fields_example", // String | Selector specifying which fields to include in a partial response.
  'key': "key_example", // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  'oauthToken': "oauthToken_example", // String | OAuth 2.0 token for the current user.
  'prettyPrint': true, // Boolean | Returns response with indentations and line breaks.
  'quotaUser': "quotaUser_example", // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
  'userIp': "userIp_example", // String | IP address of the site where the request originates. Use this if you want to enforce per-user limits.
  'commandId': ["commandId_example"], // [String] | Affected command id.
  'deviceId': ["deviceId_example"], // [String] | Sending or affected device id.
  'endTimeMs': "endTimeMs_example", // String | End of time range in ms since epoch.
  'hl': "hl_example", // String | Specifies the language code that should be used for text values in the API response.
  'maxResults': 56, // Number | 
  'startIndex': 56, // Number | 
  'startTimeMs': "startTimeMs_example", // String | Start of time range in ms since epoch.
  'token': "token_example", // String | 
  'type': "type_example" // String | Event type.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **alt** | **String**| Data format for the response. | [optional] [default to json]
 **fields** | **String**| Selector specifying which fields to include in a partial response. | [optional] 
 **key** | **String**| API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | [optional] 
 **oauthToken** | **String**| OAuth 2.0 token for the current user. | [optional] 
 **prettyPrint** | **Boolean**| Returns response with indentations and line breaks. | [optional] [default to true]
 **quotaUser** | **String**| Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. | [optional] 
 **userIp** | **String**| IP address of the site where the request originates. Use this if you want to enforce per-user limits. | [optional] 
 **commandId** | [**[String]**](String.md)| Affected command id. | [optional] 
 **deviceId** | [**[String]**](String.md)| Sending or affected device id. | [optional] 
 **endTimeMs** | **String**| End of time range in ms since epoch. | [optional] 
 **hl** | **String**| Specifies the language code that should be used for text values in the API response. | [optional] 
 **maxResults** | **Number**|  | [optional] 
 **startIndex** | **Number**|  | [optional] 
 **startTimeMs** | **String**| Start of time range in ms since epoch. | [optional] 
 **token** | **String**|  | [optional] 
 **type** | **String**| Event type. | [optional] 

### Return type

[**EventsListResponse**](EventsListResponse.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json, application/protobuf, application/xml
 - **Accept**: application/json, application/protobuf, application/xml

<a name="weaveEventsRecordDeviceEvents"></a>
# **weaveEventsRecordDeviceEvents**
> weaveEventsRecordDeviceEvents(opts)



Enables or disables recording of a particular device&#39;s events based on a boolean parameter. Enabled by default.

### Example
```javascript
var WeaviateApi = require('weaviate_api');
var defaultClient = WeaviateApi.ApiClient.default;

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

var apiInstance = new WeaviateApi.EventsApi();

var opts = { 
  'alt': "json", // String | Data format for the response.
  'fields': "fields_example", // String | Selector specifying which fields to include in a partial response.
  'key': "key_example", // String | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  'oauthToken': "oauthToken_example", // String | OAuth 2.0 token for the current user.
  'prettyPrint': true, // Boolean | Returns response with indentations and line breaks.
  'quotaUser': "quotaUser_example", // String | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
  'userIp': "userIp_example", // String | IP address of the site where the request originates. Use this if you want to enforce per-user limits.
  'hl': "hl_example", // String | Specifies the language code that should be used for text values in the API response.
  'body': new WeaviateApi.EventsRecordDeviceEventsRequest() // EventsRecordDeviceEventsRequest | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **alt** | **String**| Data format for the response. | [optional] [default to json]
 **fields** | **String**| Selector specifying which fields to include in a partial response. | [optional] 
 **key** | **String**| API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | [optional] 
 **oauthToken** | **String**| OAuth 2.0 token for the current user. | [optional] 
 **prettyPrint** | **Boolean**| Returns response with indentations and line breaks. | [optional] [default to true]
 **quotaUser** | **String**| Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. | [optional] 
 **userIp** | **String**| IP address of the site where the request originates. Use this if you want to enforce per-user limits. | [optional] 
 **hl** | **String**| Specifies the language code that should be used for text values in the API response. | [optional] 
 **body** | [**EventsRecordDeviceEventsRequest**](EventsRecordDeviceEventsRequest.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json, application/protobuf, application/xml
 - **Accept**: application/json, application/protobuf, application/xml

