8.2 KiB
mycoreapi.api.AutomationApi
Load the API package
import 'package:mycoreapi/api.dart';
All URIs are relative to http://192.168.31.140
| Method | HTTP request | Description |
|---|---|---|
| automationCreate | POST /api/automation | |
| automationDelete | DELETE /api/automation/{automationId} | Delete an automation |
| automationDeleteAllForUser | DELETE /api/automation/user/{userId} | Delete all automation for a specified |
| automationGetAll | GET /api/automation/{userId} | Get all automations for the specified user |
| automationGetDetail | GET /api/automation/detail/{automationId} | Get detail info of a specified automation |
| automationUpdate | PUT /api/automation | Update an automation |
automationCreate
AutomationDTO automationCreate(automationCreateOrUpdateDetailDTO)
Example
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO |
try {
final result = api_instance.automationCreate(automationCreateOrUpdateDetailDTO);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationCreate: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| automationCreateOrUpdateDetailDTO | AutomationCreateOrUpdateDetailDTO |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
automationDelete
MultipartFile automationDelete(automationId)
Delete an automation
Example
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final automationId = automationId_example; // String | Id of automation to delete
try {
final result = api_instance.automationDelete(automationId);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationDelete: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| automationId | String | Id of automation to delete |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to README]
automationDeleteAllForUser
MultipartFile automationDeleteAllForUser(userId)
Delete all automation for a specified
Example
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final userId = userId_example; // String | Id of user
try {
final result = api_instance.automationDeleteAllForUser(userId);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationDeleteAllForUser: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | Id of user |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to README]
automationGetAll
List automationGetAll(userId)
Get all automations for the specified user
Example
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final userId = userId_example; // String | Id of user
try {
final result = api_instance.automationGetAll(userId);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationGetAll: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | Id of user |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
automationGetDetail
AutomationDetailDTO automationGetDetail(automationId)
Get detail info of a specified automation
Example
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final automationId = automationId_example; // String | automation id
try {
final result = api_instance.automationGetDetail(automationId);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationGetDetail: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| automationId | String | automation id |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
automationUpdate
AutomationCreateOrUpdateDetailDTO automationUpdate(automationCreateOrUpdateDetailDTO)
Update an automation
Example
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO | automation to update
try {
final result = api_instance.automationUpdate(automationCreateOrUpdateDetailDTO);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationUpdate: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| automationCreateOrUpdateDetailDTO | AutomationCreateOrUpdateDetailDTO | automation to update |
Return type
AutomationCreateOrUpdateDetailDTO
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]