# DotVisionMotionApiV2.RolesApi

All URIs are relative to *http://dotvision-motion-webapi.azurewebsites.net*

Method | HTTP request | Description
------------- | ------------- | -------------
[**rolesCreateRole**](RolesApi.md#rolesCreateRole) | **POST** /api/roles | Create a role
[**rolesDeleteRole**](RolesApi.md#rolesDeleteRole) | **DELETE** /api/roles/{id} | Delete a role
[**rolesGetAllRoles**](RolesApi.md#rolesGetAllRoles) | **GET** /api/roles | Get roles collection
[**rolesGetRole**](RolesApi.md#rolesGetRole) | **GET** /api/roles/{id} | Get a role
[**rolesRolesCount**](RolesApi.md#rolesRolesCount) | **GET** /api/roles/count | Get roles count
[**rolesUpdateRole**](RolesApi.md#rolesUpdateRole) | **PUT** /api/roles | Update a role


<a name="rolesCreateRole"></a>
# **rolesCreateRole**
> RoleModel rolesCreateRole(role)

Create a role

### Example
```javascript
var DotVisionMotionApiV2 = require('dot-vision-motion-api-v2');

var api = new DotVisionMotionApiV2.RolesApi()

var role = new DotVisionMotionApiV2.RoleModel(); // {RoleModel} Role model


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **role** | [**RoleModel**](RoleModel.md)| Role model | 

### Return type

[**RoleModel**](RoleModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

 - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
 - **Accept**: application/json, text/json, application/xml, text/xml

<a name="rolesDeleteRole"></a>
# **rolesDeleteRole**
> &#39;Boolean&#39; rolesDeleteRole(id)

Delete a role

### Example
```javascript
var DotVisionMotionApiV2 = require('dot-vision-motion-api-v2');

var api = new DotVisionMotionApiV2.RolesApi()

var id = 789; // {Integer} Role id


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Role id | 

### Return type

**&#39;Boolean&#39;**

### Authorization

No authorization required

### HTTP reuqest headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, text/json, application/xml, text/xml

<a name="rolesGetAllRoles"></a>
# **rolesGetAllRoles**
> [RoleModel] rolesGetAllRoles

Get roles collection

### Example
```javascript
var DotVisionMotionApiV2 = require('dot-vision-motion-api-v2');

var api = new DotVisionMotionApiV2.RolesApi()

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

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

### Return type

[**[RoleModel]**](RoleModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, text/json, application/xml, text/xml

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

Get a role

### Example
```javascript
var DotVisionMotionApiV2 = require('dot-vision-motion-api-v2');

var api = new DotVisionMotionApiV2.RolesApi()

var id = 789; // {Integer} Role id


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Role id | 

### Return type

[**RoleModel**](RoleModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, text/json, application/xml, text/xml

<a name="rolesRolesCount"></a>
# **rolesRolesCount**
> &#39;Integer&#39; rolesRolesCount

Get roles count

### Example
```javascript
var DotVisionMotionApiV2 = require('dot-vision-motion-api-v2');

var api = new DotVisionMotionApiV2.RolesApi()

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

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

### Return type

**&#39;Integer&#39;**

### Authorization

No authorization required

### HTTP reuqest headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, text/json, application/xml, text/xml

<a name="rolesUpdateRole"></a>
# **rolesUpdateRole**
> &#39;Boolean&#39; rolesUpdateRole(role)

Update a role

### Example
```javascript
var DotVisionMotionApiV2 = require('dot-vision-motion-api-v2');

var api = new DotVisionMotionApiV2.RolesApi()

var role = new DotVisionMotionApiV2.RoleModel(); // {RoleModel} Role model


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **role** | [**RoleModel**](RoleModel.md)| Role model | 

### Return type

**&#39;Boolean&#39;**

### Authorization

No authorization required

### HTTP reuqest headers

 - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
 - **Accept**: application/json, text/json, application/xml, text/xml

