Apiguide

Transaction Media

API endpoints for retrieving Transaction Media from enVision Cloud

Overview

enVision Cloud provides capability to download images and videos associated with transactions.

You must include a valid Bearer token in the Authorization header of any request to enVision Cloud APIs. Tokens can be managed in the enVision Cloud Portal

Endpoints

Currently for the Transaction Media endpoint the following endpoints are available

  • List Media - returns a list of media for the associated transaction
  • Get Media - returns a the specified content associated with the transaction

List Media

Returns a list of media (images/videos) that are associated with the passed transaction id. This can be accessed at the following endpoint.

/api/transactionmedia/{transactionId}

Response Format

This list media endpoint will return a list of all media associated to the transaction with the content type and a description.

Example Response
[
  {
    "contentId": "427a1c3a-b47e-4e8b-bef9-0a3ba47a7d9d",
    "contentType": "image/jpeg",
    "description": "ColorImageJpeg"
  },
  {
    "contentId": "54ceef17-dc71-4f99-80ea-8881904884a7",
    "contentType": "image/jpeg",
    "description": "AnnotatedColorImageJpeg"
  },
  {
    "contentId": "ddc5a9e1-d4d4-4f4b-8967-de262ca5bccb",
    "contentType": "image/jpeg",
    "description": "DepthImage16Bit"
  }
]
PropertyData TypeDescription
contentIdstringthe identifier utilized to find the media associated with the transaction
contentTypestringthe mimetype the media is saved as and what will be retuned when requested
descriptionstringa short description of what the media is utilized for

Request Parameters

ParameterRequiredDescription
transactionIdYesthe Id of the transaction you wish to fetch the media for

Optional Request Queries

QueryDescription
contentTypeThe mime/content type that the returned list can be filtered by. Example: image/jpeg
Example Request
curl "https://api.ece.phdsolutions.ca/api/transactionmedia/95688?contentType=image%2Fjpeg" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"

Get Media

Returns the media type that is associated with the specific transaction and content id. This can be accessed at the following endpoint.

/api/transactionmedia/{transactionId}/{contentId}

Response Format

The response could be any media type that the file was saved as

Example Reponses
  • A JPEG encoded image captured during the measure operation for the specified transaction. Annotated Image
  • An MP4 encoded video captured before measuring an object.

Request Parameters

ParameterRequiredDescription
transactionIdYesthe Id of the transaction you wish to fetch the media for
contentIdYesthe Id of the media associated with the transaction
Example Request
curl "https://api.ece.phdsolutions.ca/api/transactionmedia/95688/427a1c3a-b47e-4e8b-bef9-0a3ba47a7d9d" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
--output "output.jpg"

Copyright © PHD Solutions 2024