Skip to main content

Robot API

1. Request: Get All Robots

  • Request type: GET
  • Route: /api/robots
  • Description: Retrieve a list of all robots.

Parameters

No parameters

Responses

CodeDescriptionMedia Type
200A list of robots.application/json

Example Value Schema

{
"statusCode": 200,
"messageCode": "success",
"robots": {
"totalCount": 2,
"items": [
{
"id": "0a3acb0f-4928-483b-8610-35049efa90fd",
"name": "100 Blog Posts",
"createdAt": 1748765979000,
"inputParameters": [
{
"type": "string",
"name": "originUrl",
"label": "Origin URL",
"required": true,
"defaultValue": "https://linktr.ee/blog/trends/"
}
]
},
{
"id": "9d458b00-e9dd-4799-b5f2-0166565d2af3",
"name": "HackerNews",
"createdAt": 1748765979219,
"inputParameters": [
{
"type": "string",
"name": "originUrl",
"label": "Origin URL",
"required": true,
"defaultValue": "https://news.ycombinator.com/"
}
]
}
]
}
}

| 500 | Error retrieving robots. | application/json |

Example Value Schema

{
"statusCode": 500,
"messageCode": "error",
"message": "Failed to retrieve robots"
}

2. Request: Get Robot By ID

  • Request type: GET
  • Route: GET /api/robots/{id}
  • Description: Retrieve a robot by its ID.

Parameters

NameDescription
id (required) stringThe ID of the robot to retrieve.

Responses

CodeDescriptionMedia Type
200Robot details.application/json

Example Value Schema

{
"statusCode": 200,
"messageCode": "success",
"robot": {
"id": "0a3acb0f-4928-483b-8610-35049efa90fd",
"name": "10 post link tree",
"createdAt": 1748765979000,
"inputParameters": [
{
"type": "string",
"name": "originUrl",
"label": "Origin URL",
"required": true,
"defaultValue": "https://linktr.ee/blog/trends/"
}
]
}
}
CodeDescriptionMedia Type
404Robot not found.application/json

Example Value Schema

{
"statusCode": 404,
"messageCode": "not_found",
"message": "Recording with ID not found."
}

3. Request: Duplicate a Robot

  • Request type: POST
  • Route: /api/robots/{id}/duplicate
  • Description: Duplicate an existing robot to run it on a different URL with the same structure.

Parameters

NameDescription
id (required) stringThe ID of the robot to duplicate.

Request Body

NameDescription
targetUrl (required) stringThe new URL to target in the duplicated robot.

Responses

CodeDescriptionMedia Type
201Robot duplicated successfully.application/json

Example Value Schema

{
"statusCode": 201,
"messageCode": "success",
"robot": {
"id": "e4b3c2d1-0a9b-8c7d-6e5f-4g3h2i1j0k9l",
"name": "HackerNews (show)",
"createdAt": 1748765980000,
"inputParameters": [
{
"type": "string",
"name": "originUrl",
"label": "Origin URL",
"required": true,
"defaultValue": "https://news.ycombinator.com/show"
}
]
}
}
CodeDescriptionMedia Type
404Robot not found.application/json

Example Value Schema

{
"statusCode": 404,
"messageCode": "not_found",
"message": "Robot with ID not found."
}
CodeDescriptionMedia Type
500Internal server error.application/json