# InsightsServiceApprovalApIs.AdminsApi All URIs are relative to *http://localhost:3000* Method | HTTP request | Description ------------- | ------------- | ------------- [**addGroup**](AdminsApi.md#addGroup) | **POST** /groups | Add a new user group by given parameters [**addUser**](AdminsApi.md#addUser) | **POST** /users | Add a new user by given parameters [**addWorkflow**](AdminsApi.md#addWorkflow) | **POST** /templates/{template_id}/workflows | Add a workflow by given template id [**fetchGroupById**](AdminsApi.md#fetchGroupById) | **GET** /groups/{id} | Return user group by given id [**fetchGroups**](AdminsApi.md#fetchGroups) | **GET** /groups | Return all user groups [**fetchGroupsByUserId**](AdminsApi.md#fetchGroupsByUserId) | **GET** /users/{user_id}/groups | Return associated groups by given user id [**fetchGroupsByWorkflowId**](AdminsApi.md#fetchGroupsByWorkflowId) | **GET** /workflows/{workflow_id}/groups | Return an array of groups for the workflow [**fetchRequestsByUserId**](AdminsApi.md#fetchRequestsByUserId) | **GET** /users/{user_id}/requests | Return associated requests by given user id [**fetchStageById**](AdminsApi.md#fetchStageById) | **GET** /stages/{id} | Return an approval stage by given id [**fetchTemplateById**](AdminsApi.md#fetchTemplateById) | **GET** /templates/{id} | Return a template by given id [**fetchTemplateWorkflows**](AdminsApi.md#fetchTemplateWorkflows) | **GET** /templates/{template_id}/workflows | Return an array of workflows by given template id [**fetchTemplates**](AdminsApi.md#fetchTemplates) | **GET** /templates | Return all templates [**fetchUserById**](AdminsApi.md#fetchUserById) | **GET** /users/{id} | Return user by given id [**fetchUsers**](AdminsApi.md#fetchUsers) | **GET** /users | Return a list of users [**fetchUsersByGroupId**](AdminsApi.md#fetchUsersByGroupId) | **GET** /groups/{group_id}/users | Return associated users by given group id [**fetchWorkflowById**](AdminsApi.md#fetchWorkflowById) | **GET** /workflows/{id} | Return an approval workflow by given id [**fetchWorkflowRequests**](AdminsApi.md#fetchWorkflowRequests) | **GET** /workflows/{workflow_id}/requests | Return approval requests by given workflow id [**fetchWorkflows**](AdminsApi.md#fetchWorkflows) | **GET** /workflows | Return all approval workflows [**groupOperation**](AdminsApi.md#groupOperation) | **POST** /groups/{id} | Update users in a given group [**removeGroup**](AdminsApi.md#removeGroup) | **DELETE** /groups/{id} | Delete user group by given id [**removeUser**](AdminsApi.md#removeUser) | **DELETE** /users/{id} | Delete user by given id [**removeWorkflow**](AdminsApi.md#removeWorkflow) | **DELETE** /workflows/{id} | Delete approval workflow by given id [**updateGroup**](AdminsApi.md#updateGroup) | **PATCH** /groups/{id} | Update an user group by given id [**updateUser**](AdminsApi.md#updateUser) | **PATCH** /users/{id} | Update an user by given id [**updateWorkflow**](AdminsApi.md#updateWorkflow) | **PATCH** /workflows/{id} | Update an approval workflow by given id # **addGroup** > GroupOut addGroup(groupIn) Add a new user group by given parameters Add a new user group by given parameters ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let groupIn = new InsightsServiceApprovalApIs.GroupIn(); // GroupIn | Parameters need to create user group apiInstance.addGroup(groupIn).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupIn** | [**GroupIn**](GroupIn.md)| Parameters need to create user group | ### Return type [**GroupOut**](GroupOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addUser** > UserOut addUser(userIn) Add a new user by given parameters Add a new user by given parameters ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let userIn = new InsightsServiceApprovalApIs.UserIn(); // UserIn | Parameters need to create user apiInstance.addUser(userIn).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userIn** | [**UserIn**](UserIn.md)| Parameters need to create user | ### Return type [**UserOut**](UserOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addWorkflow** > WorkflowOut addWorkflow(templateId, workflowIn) Add a workflow by given template id Add a workflow by given template id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let templateId = 56; // Number | Id of template let workflowIn = new InsightsServiceApprovalApIs.WorkflowIn(); // WorkflowIn | Parameters need to create workflow apiInstance.addWorkflow(templateId, workflowIn).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **templateId** | **Number**| Id of template | **workflowIn** | [**WorkflowIn**](WorkflowIn.md)| Parameters need to create workflow | ### Return type [**WorkflowOut**](WorkflowOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **fetchGroupById** > GroupOut fetchGroupById(id) Return user group by given id Return user group by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.fetchGroupById(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type [**GroupOut**](GroupOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* # **fetchGroups** > [GroupOut] fetchGroups(opts) Return all user groups Return all user groups ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let opts = { 'limit': 20, // Number | How many items to return at one time (max 1000) 'offset': 0 // Number | Starting Offset }; apiInstance.fetchGroups(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Number**| How many items to return at one time (max 1000) | [optional] [default to 20] **offset** | **Number**| Starting Offset | [optional] [default to 0] ### Return type [**[GroupOut]**](GroupOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchGroupsByUserId** > [GroupOut] fetchGroupsByUserId(userId) Return associated groups by given user id Return groups by given user id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let userId = 56; // Number | Id of user apiInstance.fetchGroupsByUserId(userId).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | **Number**| Id of user | ### Return type [**[GroupOut]**](GroupOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchGroupsByWorkflowId** > [WorkflowOut] fetchGroupsByWorkflowId(workflowId) Return an array of groups for the workflow Return an array of groups for the workflow ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let workflowId = 56; // Number | Id of workflow apiInstance.fetchGroupsByWorkflowId(workflowId).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workflowId** | **Number**| Id of workflow | ### Return type [**[WorkflowOut]**](WorkflowOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchRequestsByUserId** > [RequestOut] fetchRequestsByUserId(userId) Return associated requests by given user id Return requests by given user id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let userId = 56; // Number | Id of user apiInstance.fetchRequestsByUserId(userId).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | **Number**| Id of user | ### Return type [**[RequestOut]**](RequestOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchStageById** > StageOut fetchStageById(id) Return an approval stage by given id Return an approval stage by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.fetchStageById(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type [**StageOut**](StageOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* # **fetchTemplateById** > TemplateOut fetchTemplateById(id) Return a template by given id Return a template by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.fetchTemplateById(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type [**TemplateOut**](TemplateOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* # **fetchTemplateWorkflows** > [WorkflowOut] fetchTemplateWorkflows(templateId, opts) Return an array of workflows by given template id Return an array of workflows by given template id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let templateId = 56; // Number | Id of template let opts = { 'limit': 20, // Number | How many items to return at one time (max 1000) 'offset': 0 // Number | Starting Offset }; apiInstance.fetchTemplateWorkflows(templateId, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **templateId** | **Number**| Id of template | **limit** | **Number**| How many items to return at one time (max 1000) | [optional] [default to 20] **offset** | **Number**| Starting Offset | [optional] [default to 0] ### Return type [**[WorkflowOut]**](WorkflowOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchTemplates** > [TemplateOut] fetchTemplates(opts) Return all templates Return all templates ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let opts = { 'limit': 20, // Number | How many items to return at one time (max 1000) 'offset': 0 // Number | Starting Offset }; apiInstance.fetchTemplates(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Number**| How many items to return at one time (max 1000) | [optional] [default to 20] **offset** | **Number**| Starting Offset | [optional] [default to 0] ### Return type [**[TemplateOut]**](TemplateOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchUserById** > UserOut fetchUserById(id) Return user by given id Return user by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.fetchUserById(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type [**UserOut**](UserOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* # **fetchUsers** > [UserOut] fetchUsers(opts) Return a list of users Return a list of users ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let opts = { 'limit': 20, // Number | How many items to return at one time (max 1000) 'offset': 0 // Number | Starting Offset }; apiInstance.fetchUsers(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Number**| How many items to return at one time (max 1000) | [optional] [default to 20] **offset** | **Number**| Starting Offset | [optional] [default to 0] ### Return type [**[UserOut]**](UserOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchUsersByGroupId** > [UserOut] fetchUsersByGroupId(groupId) Return associated users by given group id Return users by given group id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let groupId = 56; // Number | Id of group apiInstance.fetchUsersByGroupId(groupId).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **Number**| Id of group | ### Return type [**[UserOut]**](UserOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchWorkflowById** > WorkflowOut fetchWorkflowById(id) Return an approval workflow by given id Return an approval workflow by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.fetchWorkflowById(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type [**WorkflowOut**](WorkflowOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* # **fetchWorkflowRequests** > [RequestOut] fetchWorkflowRequests(workflowId, opts) Return approval requests by given workflow id Return approval requests by given workflow id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let workflowId = 56; // Number | Id of workflow let opts = { 'limit': 20, // Number | How many items to return at one time (max 1000) 'offset': 0 // Number | Starting Offset }; apiInstance.fetchWorkflowRequests(workflowId, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workflowId** | **Number**| Id of workflow | **limit** | **Number**| How many items to return at one time (max 1000) | [optional] [default to 20] **offset** | **Number**| Starting Offset | [optional] [default to 0] ### Return type [**[RequestOut]**](RequestOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **fetchWorkflows** > [WorkflowOut] fetchWorkflows(opts) Return all approval workflows Return all approval workflows ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let opts = { 'limit': 20, // Number | How many items to return at one time (max 1000) 'offset': 0 // Number | Starting Offset }; apiInstance.fetchWorkflows(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Number**| How many items to return at one time (max 1000) | [optional] [default to 20] **offset** | **Number**| Starting Offset | [optional] [default to 0] ### Return type [**[WorkflowOut]**](WorkflowOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* # **groupOperation** > GroupOut groupOperation(id, groupOperationIn) Update users in a given group Add or remove some users from a given group. It does not replace all users. ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id let groupOperationIn = new InsightsServiceApprovalApIs.GroupOperationIn(); // GroupOperationIn | Parameters need to operate groups apiInstance.groupOperation(id, groupOperationIn).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | **groupOperationIn** | [**GroupOperationIn**](GroupOperationIn.md)| Parameters need to operate groups | ### Return type [**GroupOut**](GroupOut.md) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **removeGroup** > removeGroup(id) Delete user group by given id Delete group by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.removeGroup(id).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type null (empty response body) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **removeUser** > removeUser(id) Delete user by given id Delete user by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.removeUser(id).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type null (empty response body) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **removeWorkflow** > removeWorkflow(id) Delete approval workflow by given id Delete approval workflow by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id apiInstance.removeWorkflow(id).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | ### Return type null (empty response body) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **updateGroup** > updateGroup(id, groupIn) Update an user group by given id Update an user group by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id let groupIn = new InsightsServiceApprovalApIs.GroupIn(); // GroupIn | User group object that needs to be updated apiInstance.updateGroup(id, groupIn).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | **groupIn** | [**GroupIn**](GroupIn.md)| User group object that needs to be updated | ### Return type null (empty response body) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined # **updateUser** > updateUser(id, userIn) Update an user by given id Update an user by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id let userIn = new InsightsServiceApprovalApIs.UserIn(); // UserIn | User object that needs to be updated apiInstance.updateUser(id, userIn).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | **userIn** | [**UserIn**](UserIn.md)| User object that needs to be updated | ### Return type null (empty response body) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined # **updateWorkflow** > updateWorkflow(id, workflowIn) Update an approval workflow by given id Update an approval workflow by given id ### Example ```javascript import InsightsServiceApprovalApIs from 'insights_service_approval_ap_is'; let defaultClient = InsightsServiceApprovalApIs.ApiClient.instance; // Configure API key authorization: APIKey_auth let APIKey_auth = defaultClient.authentications['APIKey_auth']; APIKey_auth.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //APIKey_auth.apiKeyPrefix = 'Token'; let apiInstance = new InsightsServiceApprovalApIs.AdminsApi(); let id = 56; // Number | Query by id let workflowIn = new InsightsServiceApprovalApIs.WorkflowIn(); // WorkflowIn | Parameters need to update approval workflow apiInstance.updateWorkflow(id, workflowIn).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| Query by id | **workflowIn** | [**WorkflowIn**](WorkflowIn.md)| Parameters need to update approval workflow | ### Return type null (empty response body) ### Authorization [APIKey_auth](../README.md#APIKey_auth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined