# DotVisionMotionApiV2.OrganisationsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**organisationsCreateOrganisation**](OrganisationsApi.md#organisationsCreateOrganisation) | **POST** /api/organisations | Create an organisation
[**organisationsDeleteOrganisation**](OrganisationsApi.md#organisationsDeleteOrganisation) | **DELETE** /api/organisations/{id} | Delete an organisation
[**organisationsDeleteUniqueNameForOrganisation**](OrganisationsApi.md#organisationsDeleteUniqueNameForOrganisation) | **DELETE** /api/organisations/{id}/uniqueName | Delete unique name for organisation
[**organisationsGetAllOrganisations**](OrganisationsApi.md#organisationsGetAllOrganisations) | **GET** /api/organisations | Get organisations collection
[**organisationsGetOrganisation**](OrganisationsApi.md#organisationsGetOrganisation) | **GET** /api/organisations/{id} | Get an organisation
[**organisationsGetUniqueNameForOrganisation**](OrganisationsApi.md#organisationsGetUniqueNameForOrganisation) | **GET** /api/organisations/{id}/uniqueName | Get unique name attributed to the organisation
[**organisationsOrganisationAdminsCount**](OrganisationsApi.md#organisationsOrganisationAdminsCount) | **GET** /api/organisations/{id}/admins/count | Get organisation administrators count
[**organisationsOrganisationAdminsGetAll**](OrganisationsApi.md#organisationsOrganisationAdminsGetAll) | **GET** /api/organisations/{id}/admins | Get organisation administrators collection
[**organisationsOrganisationEventsGetAll**](OrganisationsApi.md#organisationsOrganisationEventsGetAll) | **GET** /api/organisations/{id}/events | Get organisation events collection
[**organisationsOrganisationLinkAdmin**](OrganisationsApi.md#organisationsOrganisationLinkAdmin) | **POST** /api/organisations/{id}/admins | Link an administrator to an organisation
[**organisationsOrganisationUnlinkAdmin**](OrganisationsApi.md#organisationsOrganisationUnlinkAdmin) | **DELETE** /api/organisations/{id}/admins | Unlink an administrator of an organisation
[**organisationsOrganisationUpdateLinkAdmin**](OrganisationsApi.md#organisationsOrganisationUpdateLinkAdmin) | **PUT** /api/organisations/{id}/admins | Update an administrator link for an organisation
[**organisationsOrganisationsCount**](OrganisationsApi.md#organisationsOrganisationsCount) | **GET** /api/organisations/count | Get organisations count
[**organisationsOrganisationsEventsCount**](OrganisationsApi.md#organisationsOrganisationsEventsCount) | **GET** /api/organisations/{id}/events/count | Get organisation events count
[**organisationsSearchOrganisations**](OrganisationsApi.md#organisationsSearchOrganisations) | **GET** /api/organisations/search | Search for an organisation by name
[**organisationsSetUniqueNameForOrganisation**](OrganisationsApi.md#organisationsSetUniqueNameForOrganisation) | **POST** /api/organisations/{id}/uniqueName | Set unique name for organisation
[**organisationsUpdateOrganisation**](OrganisationsApi.md#organisationsUpdateOrganisation) | **PUT** /api/organisations | Update an organisation
[**organisationsUpdateUniqueNameForOrganisation**](OrganisationsApi.md#organisationsUpdateUniqueNameForOrganisation) | **PUT** /api/organisations/{id}/uniqueName | Update unique name for organisation


<a name="organisationsCreateOrganisation"></a>
# **organisationsCreateOrganisation**
> OrganisationModel organisationsCreateOrganisation(organisation)

Create an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

var organisation = new DotVisionMotionApiV2.OrganisationModel(); // {OrganisationModel} Organisation model


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organisation** | [**OrganisationModel**](OrganisationModel.md)| Organisation model | 

### Return type

[**OrganisationModel**](OrganisationModel.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="organisationsDeleteOrganisation"></a>
# **organisationsDeleteOrganisation**
> &#39;Boolean&#39; organisationsDeleteOrganisation(id)

Delete an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation 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="organisationsDeleteUniqueNameForOrganisation"></a>
# **organisationsDeleteUniqueNameForOrganisation**
> &#39;Boolean&#39; organisationsDeleteUniqueNameForOrganisation(id)

Delete unique name for organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation 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="organisationsGetAllOrganisations"></a>
# **organisationsGetAllOrganisations**
> [OrganisationModel] organisationsGetAllOrganisations(opts)

Get organisations collection

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

var opts = { 
  'count': 56 // {Integer} Number of result by request
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **count** | **Integer**| Number of result by request | [optional] 

### Return type

[**[OrganisationModel]**](OrganisationModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

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

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

Get an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

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

### Return type

[**OrganisationModel**](OrganisationModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

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

<a name="organisationsGetUniqueNameForOrganisation"></a>
# **organisationsGetUniqueNameForOrganisation**
> &#39;String&#39; organisationsGetUniqueNameForOrganisation(id)

Get unique name attributed to the organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

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

### Return type

**&#39;String&#39;**

### Authorization

No authorization required

### HTTP reuqest headers

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

<a name="organisationsOrganisationAdminsCount"></a>
# **organisationsOrganisationAdminsCount**
> &#39;Integer&#39; organisationsOrganisationAdminsCount(id)

Get organisation administrators count

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

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

### 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="organisationsOrganisationAdminsGetAll"></a>
# **organisationsOrganisationAdminsGetAll**
> [UserInRolesModel] organisationsOrganisationAdminsGetAll(id)

Get organisation administrators collection

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

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

### Return type

[**[UserInRolesModel]**](UserInRolesModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

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

<a name="organisationsOrganisationEventsGetAll"></a>
# **organisationsOrganisationEventsGetAll**
> [EventModel] organisationsOrganisationEventsGetAll(id)

Get organisation events collection

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

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

### Return type

[**[EventModel]**](EventModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

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

<a name="organisationsOrganisationLinkAdmin"></a>
# **organisationsOrganisationLinkAdmin**
> &#39;Boolean&#39; organisationsOrganisationLinkAdmin(id, userId, friendlyRoleName)

Link an administrator to an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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

var userId = "userId_example"; // {String} User id

var friendlyRoleName = "friendlyRoleName_example"; // {String} Friendly role name


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation id | 
 **userId** | **String**| User id | 
 **friendlyRoleName** | **String**| Friendly role name | 

### 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="organisationsOrganisationUnlinkAdmin"></a>
# **organisationsOrganisationUnlinkAdmin**
> &#39;Boolean&#39; organisationsOrganisationUnlinkAdmin(id, userId)

Unlink an administrator of an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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

var userId = "userId_example"; // {String} User id


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation id | 
 **userId** | **String**| User 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="organisationsOrganisationUpdateLinkAdmin"></a>
# **organisationsOrganisationUpdateLinkAdmin**
> &#39;Boolean&#39; organisationsOrganisationUpdateLinkAdmin(id, userId, friendlyRoleName)

Update an administrator link for an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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

var userId = "userId_example"; // {String} User id

var friendlyRoleName = "friendlyRoleName_example"; // {String} Friendly role name


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation id | 
 **userId** | **String**| User id | 
 **friendlyRoleName** | **String**| Friendly role name | 

### 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="organisationsOrganisationsCount"></a>
# **organisationsOrganisationsCount**
> &#39;Integer&#39; organisationsOrganisationsCount

Get organisations count

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.organisationsOrganisationsCount(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="organisationsOrganisationsEventsCount"></a>
# **organisationsOrganisationsEventsCount**
> &#39;Integer&#39; organisationsOrganisationsEventsCount(id)

Get organisation events count

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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


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

### Parameters

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

### 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="organisationsSearchOrganisations"></a>
# **organisationsSearchOrganisations**
> [OrganisationModel] organisationsSearchOrganisations(q, opts)

Search for an organisation by name

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

var q = "q_example"; // {String} A query string

var opts = { 
  'count': 56 // {Integer} Number of organisations to return
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **q** | **String**| A query string | 
 **count** | **Integer**| Number of organisations to return | [optional] 

### Return type

[**[OrganisationModel]**](OrganisationModel.md)

### Authorization

No authorization required

### HTTP reuqest headers

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

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

Set unique name for organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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

var uniqueName = "uniqueName_example"; // {String} Unique name


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation id | 
 **uniqueName** | **String**| Unique name | 

### 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="organisationsUpdateOrganisation"></a>
# **organisationsUpdateOrganisation**
> &#39;Boolean&#39; organisationsUpdateOrganisation(organisation)

Update an organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

var organisation = new DotVisionMotionApiV2.OrganisationModel(); // {OrganisationModel} Organisation model


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organisation** | [**OrganisationModel**](OrganisationModel.md)| Organisation 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

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

Update unique name for organisation

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

var api = new DotVisionMotionApiV2.OrganisationsApi()

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

var newUniqueName = "newUniqueName_example"; // {String} 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Integer**| Organisation id | 
 **newUniqueName** | **String**|  | 

### 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

