跳至主要内容

Get data stream blob metadata

GET 

/api/v1/orgs/{orgId}/devices/{deviceId}/data-streams/{dataStreamId}/blobs/{blobId}/metadata

Retrieve stored metadata for a blob previously uploaded via the custom-device service, identified by its blobId. The response's downloadUrl points to the corresponding content read via the existing GET .../blobs/{blobKey} endpoint. Only valid for a data stream declared dataType: blob.

Parameters

  • deviceId (string, required): Unique ID of the device. Example: 74fe488d5d35
  • dataStreamId (Guid, required): Unique ID of the data stream. Example: 3a217ee3-fb2c-617b-6ff6-7257537afade
  • blobId (string, required): Document id of the blob metadata record.

Response Fields:

  • blobId (string): Document id of the blob metadata record.
  • contentType (string, nullable): MIME content type of the blob.
  • description (string, nullable): Caller-supplied description.
  • downloadFileName (string): Filename to use when downloading the blob content.
  • size (long): Size of the blob content, in bytes.
  • uploadedAt (DateTime): When the blob was uploaded.
  • downloadUrl (string, nullable): Absolute URL to retrieve the blob content, via GET .../blobs/{blobKey}.
  • metadata (object, nullable): Caller-supplied dynamic metadata (arbitrary JSON, application-defined shape).

Responses

  • 200 OK: Returns the blob metadata.
  • 400 Bad Request: Invalid request parameters.
  • 404 Not Found: No metadata was found for the specified device and blobId.
  • 422 Unprocessable Content: The data stream's dataType is not exactly blob. This is rejected regardless of what the actual dataType is (including double, integer, boolean, string, long, application/json, application/octet-stream, image/png, image/jpeg, image/jpg, and data-pack), since only a data stream declared dataType: blob stores metadata records.

Security

  • This API requires authentication.

Request​

Responses​

Returns the blob metadata: blobId, contentType, description, downloadFileName, size, uploadedAt, downloadUrl, metadata.