Use this endpoint to upload data to your foxglove-hosted site. The upload is a two-request process.
- Make a request to this upload endpoint to create an upload
link. - Issue a PUT HTTP request to the
linkresponse field URL.
Your PUT request header should have Content-Type: application/octet-stream, and your request body should contain your file content.
Note: If you are using a self-hosted site, see this guide for uploading data.
While we support processing very large files, we generally recommend avoiding large (50GB+) files to reduce the chance of upload failures or processing issues. If you have tooling that generates very large files, consider splitting them up into smaller chunks.
In addition to filename, one of deviceId, deviceName, or key is required and projectId is recommended.
Unique name of the associated device. If no device exists with this name, the device will be created.
A name that does not match an existing device must satisfy the same rules as POST /devices: at most 100 characters, containing only letters, numbers, underscores, periods, and hyphens.
The project ID that the recording belongs to. Required for multi-project orgs if an existing device is not provided
Key of a session to associate the upload with. If no session exists with this key, a new session will be created using the provided device.
- Productionhttps://api.foxglove.dev/v1/data/upload
from foxglove.client import Client
from pathlib import Path
token = "<YOUR API TOKEN HERE>"
client = Client(token=token)
with Path("my_mcap_data.mcap").open("rb") as byte_stream:
client.upload_data(
device_id=device_id,
filename="my_mcap_data.mcap",
data=byte_stream,
callback=lambda size, progress: print(size, progress),
project_id="<YOUR PROJECT ID HERE>",
)