Skip to content

Latest commit

 

History

History
242 lines (153 loc) · 8.58 KB

RobotApi.md

File metadata and controls

242 lines (153 loc) · 8.58 KB

\RobotApi

All URIs are relative to http://localhost/api/v2.0

Method HTTP request Description
CreateRobot Post /robots Create a robot account
DeleteRobot Delete /robots/{robot_id} Delete a robot account
GetRobotByID Get /robots/{robot_id} Get a robot account
ListRobot Get /robots Get robot account
RefreshSec Patch /robots/{robot_id} Refresh the robot secret
UpdateRobot Put /robots/{robot_id} Update a robot account

CreateRobot

RobotCreated CreateRobot(ctx, robot, optional) Create a robot account

Create a robot account

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
robot RobotCreate The JSON object of a robot account.
optional *RobotApiCreateRobotOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RobotApiCreateRobotOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

RobotCreated

Authorization

basic

HTTP request headers

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

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

DeleteRobot

DeleteRobot(ctx, robotId, optional) Delete a robot account

This endpoint deletes specific robot account information by robot ID.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
robotId int32 Robot ID
optional *RobotApiDeleteRobotOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RobotApiDeleteRobotOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

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

GetRobotByID

Robot GetRobotByID(ctx, robotId, optional) Get a robot account

This endpoint returns specific robot account information by robot ID.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
robotId int32 Robot ID
optional *RobotApiGetRobotByIDOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RobotApiGetRobotByIDOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

Robot

Authorization

basic

HTTP request headers

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

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

ListRobot

[]Robot ListRobot(ctx, optional) Get robot account

List the robot accounts with the specified level and project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *RobotApiListRobotOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RobotApiListRobotOpts struct

Name Type Description Notes
xRequestId optional.String An unique ID for the request
q optional.String Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=v)", "range(k=[minmax])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=v2,k3=[minmax]
sort optional.String Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with "sort=field1,-field2"
page optional.Int64 The page number [default to 1]
pageSize optional.Int64 The size of per page [default to 10]

Return type

[]Robot

Authorization

basic

HTTP request headers

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

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

RefreshSec

RobotSec RefreshSec(ctx, robotId, robotSec, optional) Refresh the robot secret

Refresh the robot secret

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
robotId int32 Robot ID
robotSec RobotSec The JSON object of a robot account.
optional *RobotApiRefreshSecOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RobotApiRefreshSecOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

RobotSec

Authorization

basic

HTTP request headers

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

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

UpdateRobot

UpdateRobot(ctx, robotId, robot, optional) Update a robot account

This endpoint updates specific robot account information by robot ID.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
robotId int32 Robot ID
robot Robot The JSON object of a robot account.
optional *RobotApiUpdateRobotOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RobotApiUpdateRobotOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

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