openapi: 3.2.0 info: title: Foxglove Recording Attachments API version: v1 x-logo: url: https://foxglove.dev/images/logo-icon-round.png description: '# Python client Foxglove provides a Python client library ([`foxglove-client`](https://github.com/foxglove/foxglove-python)) to more easily interact with the Foxglove API. The SDK can be downloaded from [PyPI](https://pypi.org/project/foxglove-client/) and source is available on [GitHub](https://github.com/foxglove/foxglove-python). # Authentication All routes excluding the [Site Bucket Notifications endpoint](#tag/Sites/paths/~1site-bucket-notifications/post) require an [API key](/docs/settings#api-keys) with specific capabilities. Only organization admins can create an API key. Requests must include the API key in the `Authorization` header as a bearer token: ``` Authorization: Bearer fox_sk_1234... ``` Each endpoint in the API reference lists the capabilities required for access. An endpoint with Authorizations `ApiKey (devices.list)` would require an api key with the `devices.list` capability. # Sorting and pagination Some GET endpoints support sorting and pagination. Where supported, you will see the following query parameters in the endpoint documentation: * `sortBy` – Field name to sort by (endpoint specific) * `sortOrder` – "asc" or "desc" * `limit` – Number of records in the response * `offset` – Number of records to skip If no limit is provided, endpoints will default to a limit of 2000 items. Requesting a limit greater than 2000 items will result in a 400 response. # Timestamps Unless otherwise documented, all timestamp related fields (start, end, created, etc) use the ISO8601 conforming [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) UTC "Zulu" format. In the documentation this will appear as `string` types with `` formatting (i.e. `string `). These timestamps support nanosecond resolution with up to nine fractional digits. Examples: - 2023-04-06T09:15:30Z - 2023-04-06T18:27:45.876543210Z > Note: Variants of RFC3339 using durations or offsets which are not conforming to ISO8601 are not supported. # Rate limits To help ensure responsiveness for all clients, requests to the API may be rate-limited. In this case, a request will receive a status code of 429. Your client may refer to headers, such as "Retry-After", to determine when a request should be retried. In general, if your client experiences an error, you should adjust the rate at which your client makes requests, and you may issue retries with a strategy such as exponential backoff. ' servers: - url: https://api.foxglove.dev/v1 description: Production security: [] tags: - name: Recording Attachments description: 'A recording attachment resource represents information about an MCAP attachment imported to Foxglove. Attachments are available for individual download or with their recording. ' paths: /recording-attachments: get: tags: - Recording Attachments summary: List attachments security: - ApiKey: - recordings.list x-codeSamples: - lang: python label: Python source: 'from foxglove.client import Client token = "" client = Client(token=token) client.get_attachments() ' parameters: - in: query name: recordingId description: filter by recording ID schema: type: string - in: query name: siteId description: filter by Primary Site ID schema: type: string - in: query name: deviceId description: filter by device ID schema: type: string - in: query name: deviceName description: filter by device name schema: type: string - in: query name: device.id description: Equivalent to deviceId, and ignored if deviceId is supplied schema: type: string deprecated: true - in: query name: device.name description: Equivalent to deviceName, and ignored if deviceName is supplied schema: type: string deprecated: true - in: query name: sortBy description: Sort by a single field of the attachment schema: type: string enum: - logTime - in: query name: projectId description: Filter attachments by project schema: type: string - $ref: '#/components/parameters/sortOrder' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/RecordingAttachment' /recording-attachments/{id}: parameters: - in: path name: id schema: type: string required: true description: ID of the attachment get: tags: - Recording Attachments summary: Get an attachment security: - ApiKey: - recordings.list - QueryServiceToken: [] responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/RecordingAttachment' /recording-attachments/{id}/download: parameters: - in: path name: id schema: type: string required: true description: ID of the attachment to download get: tags: - Recording Attachments summary: Download an attachment description: 'To download an attachment make a request to this endpoint and follow the 302 redirect. The attachment will download directly from the Primary Site. Note: The redirect link expires after 15 minutes. ' security: - ApiKey: - recordings.list x-codeSamples: - lang: python label: Python source: 'from foxglove.client import Client token = "" client = Client(token=token) bytes = client.download_attachment(id=''att_0dHT6ZvqJhfwOcml'') ' responses: '302': description: Found headers: Location: schema: type: string components: parameters: limit: in: query name: limit description: Maximum number of items to return schema: type: number minimum: 0 maximum: 2000 default: 2000 offset: in: query name: offset description: Number of items to skip before returning the results schema: type: integer minimum: 0 default: 0 sortOrder: in: query name: sortOrder description: Sort order for the `sortBy` field schema: type: string enum: - asc - desc schemas: RecordingAttachment: type: object description: An attachment resource represents information about an MCAP attachment imported to Foxglove. properties: id: type: string description: ID of the attachment recordingId: type: string description: ID of the recording with which the attachment is associated siteId: type: string description: ID of the Primary Site where the attachment data is stored name: type: string description: Name field from the attachment record mediaType: type: string description: Media type from the attachment record logTime: type: string description: Log time field from the attachment record createTime: type: string description: Create time field from the attachment record crc: type: number description: CRC field from the attachment record as a decimal number dataOffset: type: integer description: Offset to the start of the attachment in bytes size: type: integer description: Size of the attachment in bytes fingerprint: type: string description: 'A hash of the attachment content (algorithm subject to change). Two attachments with the same fingerprint will have identical content. ' lakePath: type: string description: Path of attachment in lake storage. Only provided for [self-hosted Primary Sites](https://docs.foxglove.dev/docs/primary-sites#self-hosted). required: - id - recordingId - siteId - name - mediaType - logTime - createTime - crc - size - fingerprint securitySchemes: Session: type: apiKey in: cookie name: fox.session description: User permissions when signed into the website ApiKey: type: http scheme: bearer description: API key authentication using HTTP Bearer auth SiteBucketNotificationBearerToken: type: http scheme: bearer description: Site bucket notification authentication using HTTP Bearer auth x-tagGroups: - name: Data Platform tags: - Coverage - Custom Properties - Device Tokens - Devices - Events - Event Types - Imports - Lake files - Projects - Recording Attachments - Recordings - Sessions - Site Tokens - Site Inbox Notification Tokens - Sites - Stream data - Topics - name: Webhooks tags: - Webhook Payloads - name: Visualization tags: - Extensions - Layouts