Back to Apitable

.AutomationApi

packages/api-client/AutomationApi.md

1.13.0-beta.118.0 KB
Original Source

.AutomationApi

All URIs are relative to http://backend/api/v1

MethodHTTP requestDescription
createActionPOST /automation/{resourceId}/actionsCreate automation action
createTriggerPOST /automation/{resourceId}/triggersCreate automation robot trigger
deleteActionDELETE /automation/{resourceId}/actions/{actionId}Delete automation action
deleteRobotDELETE /automation/{resourceId}/robots/{robotId}Delete automation robot
deleteTriggerDELETE /automation/{resourceId}/triggers/{triggerId}Delete automation trigger
getNodeRobotGET /automation/{resourceId}/robots/{robotId}Get node automation detail.
getResourceRobotsGET /automation/robotsGet automation robots
getRunHistoryGET /automation/{resourceId}/roots/{robotId}/run-historyGet automation run history
modifyRobotPATCH /automation/{resourceId}/robots/{robotId}Update automation info.
updateActionPATCH /automation/{resourceId}/actions/{actionId}Update automation action
updateTriggerPATCH /automation/{resourceId}/triggers/{triggerId}Update automation robot trigger

createAction

ResponseDataListActionVO createAction(createActionRO, )

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiCreateActionRequest = {
  // CreateActionRO
  createActionRO: {
    robotId: "arb****",
    input: {},
    prevActionId: "atr",
    actionTypeId: "test",
  },
  // string | node id
  resourceId: "aut****",
  // string | share id
  shareId: "shr****",
};

apiInstance.createAction(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
createActionROCreateActionRO
resourceId[string]node iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataListActionVO

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createTrigger

ResponseDataListTriggerVO createTrigger(createTriggerRO, )

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiCreateTriggerRequest = {
  // CreateTriggerRO
  createTriggerRO: {
    robotId: "arb****",
    input: {},
    relatedResourceId: "dst***/fom***",
    prevTriggerId: "atr",
    triggerTypeId: "test",
  },
  // string | node id
  resourceId: "aut****",
  // string | share id
  shareId: "shr****",
};

apiInstance.createTrigger(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
createTriggerROCreateTriggerRO
resourceId[string]node iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataListTriggerVO

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAction

ResponseDataVoid deleteAction()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiDeleteActionRequest = {
  // string | node id
  resourceId: "aut****",
  // string | action id
  actionId: "atr****",
  // string | robot id
  robotId: "arb****",
};

apiInstance.deleteAction(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
resourceId[string]node iddefaults to undefined
actionId[string]action iddefaults to undefined
robotId[string]robot iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteRobot

ResponseDataVoid deleteRobot()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiDeleteRobotRequest = {
  // string | node id
  resourceId: "aut****",
  // string | robot id
  robotId: "arb****",
};

apiInstance.deleteRobot(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
resourceId[string]node iddefaults to undefined
robotId[string]robot iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteTrigger

ResponseDataVoid deleteTrigger()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiDeleteTriggerRequest = {
  // string | node id
  resourceId: "aut****",
  // string | trigger id
  triggerId: "atr****",
  // string | robot id
  robotId: "arb****",
};

apiInstance.deleteTrigger(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
resourceId[string]node iddefaults to undefined
triggerId[string]trigger iddefaults to undefined
robotId[string]robot iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getNodeRobot

ResponseDataAutomationVO getNodeRobot()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiGetNodeRobotRequest = {
  // string | node id
  resourceId: "aut****",
  // string | robot id
  robotId: "arb****",
  // string | share id
  shareId: "shr****",
};

apiInstance.getNodeRobot(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
resourceId[string]node iddefaults to undefined
robotId[string]robot iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataAutomationVO

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getResourceRobots

ResponseDataListAutomationSimpleVO getResourceRobots()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiGetResourceRobotsRequest = {
  // string | node id
  resourceId: "aut****",
  // string | share id
  shareId: "shr****",
};

apiInstance.getResourceRobots(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
resourceId[string]node iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataListAutomationSimpleVO

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getRunHistory

ResponseDataListAutomationTaskSimpleVO getRunHistory()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiGetRunHistoryRequest = {
  // number | Current page number, default: 1
  pageNum: 1,
  // string | share id
  shareId: "shr****",
  // string | node id
  resourceId: "aut****",
  // string | robot id
  robotId: "arb****",
  // number | Page size, default: 20 (optional)
  pageSize: 20,
};

apiInstance.getRunHistory(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
pageNum[number]Current page number, default: 1defaults to undefined
shareId[string]share iddefaults to undefined
resourceId[string]node iddefaults to undefined
robotId[string]robot iddefaults to undefined
pageSize[number]Page size, default: 20(optional) defaults to undefined

Return type

ResponseDataListAutomationTaskSimpleVO

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

modifyRobot

ResponseDataVoid modifyRobot(updateRobotRO, )

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiModifyRobotRequest = {
  // UpdateRobotRO
  updateRobotRO: {
    name: "test",
    description: "test",
    props: {
      failureNotifyEnable: false,
    },
    isActive: true,
  },
  // string | node id
  resourceId: "aut****",
  // string | robot id
  robotId: "arb****",
  // string | share id
  shareId: "shr****",
};

apiInstance.modifyRobot(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
updateRobotROUpdateRobotRO
resourceId[string]node iddefaults to undefined
robotId[string]robot iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAction

ResponseDataListActionVO updateAction(updateActionRO, )

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiUpdateActionRequest = {
  // UpdateActionRO
  updateActionRO: {
    robotId: "arb****",
    input: {},
    prevActionId: "atr",
    actionTypeId: "test",
  },
  // string | node id
  resourceId: "aut****",
  // string | action id
  actionId: "atr****",
  // string | share id
  shareId: "shr****",
};

apiInstance.updateAction(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
updateActionROUpdateActionRO
resourceId[string]node iddefaults to undefined
actionId[string]action iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataListActionVO

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateTrigger

ResponseDataListTriggerVO updateTrigger(updateTriggerRO, )

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .AutomationApi(configuration);

let body:.AutomationApiUpdateTriggerRequest = {
  // UpdateTriggerRO
  updateTriggerRO: {
    robotId: "arb****",
    input: {},
    relatedResourceId: "dst***/fom***",
    prevTriggerId: "atr",
    triggerTypeId: "test",
  },
  // string | node id
  resourceId: "aut****",
  // string | trigger id
  triggerId: "atr****",
  // string | share id
  shareId: "shr****",
};

apiInstance.updateTrigger(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
updateTriggerROUpdateTriggerRO
resourceId[string]node iddefaults to undefined
triggerId[string]trigger iddefaults to undefined
shareId[string]share iddefaults to undefined

Return type

ResponseDataListTriggerVO

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]