Skip to main content

Robot Resources

This section describes the APIs for listing and downloading files associated with a robot (e.g., recorded data, csv, and other uploaded assets).


Get Robot Resources

Retrieves a list of all resource files associated with a specific robot.

Endpoint

GET /robot/{robotId}/resources

Request Headers

{
"Authorization": "bearer <access_token>"
}

Path Parameters

  • robotId (string): The unique identifier of the robot.

Description

Returns all file resources uploaded or recorded for the given robot. Each entry includes the resource ID, file name, file type, size in bytes, and the upload timestamp.

Response Fields

  • ResourceId (string): The unique identifier of the resource file.
  • Name (string): The file name.
  • Type (string): The file type (e.g., rosbag, log, image).
  • Size (long): File size in bytes.
  • CreatedAt (datetime): The upload start time in UTC.

Example Response

[
{
"ResourceId": "abc123def456",
"Name": "recording_2024-09-29.bag",
"Type": "rosbag",
"Size": 104857600,
"CreatedAt": "2024-09-29T13:07:27.211Z"
},
{
"ResourceId": "xyz789ghi012",
"Name": "system_log.txt",
"Type": "log",
"Size": 20480,
"CreatedAt": "2024-09-28T09:15:00.000Z"
}
]

Get Resource Download URL

Generates a pre-signed download URL for a specific resource file belonging to a robot.

Endpoint

GET /robot/{robotId}/resource/{resourceId}/download

Request Headers

{
"Authorization": "bearer <access_token>"
}

Path Parameters

  • robotId (string): The unique identifier of the robot.
  • resourceId (string): The unique identifier of the resource to download. Use the ResourceId value returned by the Get Robot Resources endpoint.

Description

Returns a temporary pre-signed URL that can be used to download the specified resource file directly from storage. If the resource does not exist or the URL cannot be generated, a 404 Not Found response is returned.

Response Fields

  • Url (string): The pre-signed download URL.

Example Response

{
"Url": "https://storage.example.com/bucket/abc123def456?signature=..."
}

Error Responses

StatusDescription
404 Not FoundThe resource was not found or a download URL could not be generated.