# RainbowAdminPortal.BotsApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**adminBotsDeleteBots**](BotsApi.md#adminBotsDeleteBots) | **DELETE** /api/rainbow/admin/v1.0/bots/{botId} | Delete a bot service.
[**adminBotsGetBotId**](BotsApi.md#adminBotsGetBotId) | **GET** /api/rainbow/admin/v1.0/bots/{botId} | Get a bot service data.
[**adminBotsGetBots**](BotsApi.md#adminBotsGetBots) | **GET** /api/rainbow/admin/v1.0/bots | Get all bot services.
[**adminBotsPostBots**](BotsApi.md#adminBotsPostBots) | **POST** /api/rainbow/admin/v1.0/bots | Create a bot service.
[**adminBotsPutBots**](BotsApi.md#adminBotsPutBots) | **PUT** /api/rainbow/admin/v1.0/bots/{botId} | Update a bot service.



## adminBotsDeleteBots

> AdminBotsDeleteBotsSuccess adminBotsDeleteBots(botId, accept)

Delete a bot service.

### Example

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

var apiInstance = new RainbowAdminPortal.BotsApi();
var botId = "botId_example"; // String | Bot service unique identifier (like 578bb08dc0d8c107725ef8c4)
var accept = "accept_example"; // String | application/json
apiInstance.adminBotsDeleteBots(botId, accept).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **botId** | **String**| Bot service unique identifier (like 578bb08dc0d8c107725ef8c4) | 
 **accept** | **String**| application/json | 

### Return type

[**AdminBotsDeleteBotsSuccess**](AdminBotsDeleteBotsSuccess.md)

### Authorization

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

### HTTP request headers

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


## adminBotsGetBotId

> AdminBotsGetBotIdSuccess adminBotsGetBotId(botId, accept)

Get a bot service data.

### Example

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

var apiInstance = new RainbowAdminPortal.BotsApi();
var botId = "botId_example"; // String | Bot Service unique identifier (like 578bb08dc0d8c107725ef8c4)
var accept = "accept_example"; // String | application/json
apiInstance.adminBotsGetBotId(botId, accept).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **botId** | **String**| Bot Service unique identifier (like 578bb08dc0d8c107725ef8c4) | 
 **accept** | **String**| application/json | 

### Return type

[**AdminBotsGetBotIdSuccess**](AdminBotsGetBotIdSuccess.md)

### Authorization

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

### HTTP request headers

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


## adminBotsGetBots

> AdminBotsGetBotsSuccess adminBotsGetBots(accept, opts)

Get all bot services.

This API can be used to retrieve the list of bot services whatever the service owner.

### Example

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

var apiInstance = new RainbowAdminPortal.BotsApi();
var accept = "accept_example"; // String | application/json
var opts = {
  'format': "format_example", // String | Allows to retrieve more or less bot services details in response.    - `small`: id, name, jid    - `medium`: id, name, jid    - `full`: id, name, jid, createdByUserId, createdByLoginEmail
  'limit': 3.4, // Number | Allow to specify the number of bot services to retrieve.
  'offset': 3.4, // Number | Allow to specify the position of first bot to retrieve (first bot if not specified). Warning: if offset > total, no results are returned.
  'sortField': "sortField_example", // String | Sort bots list based on the given field.
  'sortOrder': 3.4 // Number | Specify order when sorting bots list.
};
apiInstance.adminBotsGetBots(accept, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **accept** | **String**| application/json | 
 **format** | **String**| Allows to retrieve more or less bot services details in response.    - &#x60;small&#x60;: id, name, jid    - &#x60;medium&#x60;: id, name, jid    - &#x60;full&#x60;: id, name, jid, createdByUserId, createdByLoginEmail | [optional] 
 **limit** | **Number**| Allow to specify the number of bot services to retrieve. | [optional] 
 **offset** | **Number**| Allow to specify the position of first bot to retrieve (first bot if not specified). Warning: if offset &gt; total, no results are returned. | [optional] 
 **sortField** | **String**| Sort bots list based on the given field. | [optional] 
 **sortOrder** | **Number**| Specify order when sorting bots list. | [optional] 

### Return type

[**AdminBotsGetBotsSuccess**](AdminBotsGetBotsSuccess.md)

### Authorization

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

### HTTP request headers

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


## adminBotsPostBots

> AdminBotsPostBotsSuccess adminBotsPostBots(body)

Create a bot service.

Rainbow superadmin can create/delete bot services. [todo - TBC]

### Example

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

var apiInstance = new RainbowAdminPortal.BotsApi();
var body = new RainbowAdminPortal.AdminBotsPostBots(); // AdminBotsPostBots | 
apiInstance.adminBotsPostBots(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**AdminBotsPostBots**](AdminBotsPostBots.md)|  | 

### Return type

[**AdminBotsPostBotsSuccess**](AdminBotsPostBotsSuccess.md)

### Authorization

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

### HTTP request headers

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


## adminBotsPutBots

> AdminBotsPutBotsSuccess adminBotsPutBots(botId, body)

Update a bot service.

### Example

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

var apiInstance = new RainbowAdminPortal.BotsApi();
var botId = "botId_example"; // String | Bot service unique identifier (like 578bb08dc0d8c107725ef8c4)
var body = new RainbowAdminPortal.AdminBotsPutBots(); // AdminBotsPutBots | 
apiInstance.adminBotsPutBots(botId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **botId** | **String**| Bot service unique identifier (like 578bb08dc0d8c107725ef8c4) | 
 **body** | [**AdminBotsPutBots**](AdminBotsPutBots.md)|  | 

### Return type

[**AdminBotsPutBotsSuccess**](AdminBotsPutBotsSuccess.md)

### Authorization

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

### HTTP request headers

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

