scenarios we are working on,
- To show PI&D diagram with annotations, which help to select the asset and create a threat for that asset.
- Or draw a rectangle over the PI&D diagram to select multiple assets.
For the above two scenarios we are referring APIs in,
- https://docs.cognite.com/api/v1/#tag/Engineering-diagrams
- Quickstart — cognite-sdk 5.3.1 documentation (readthedocs-hosted.com)
We are successful in getting the PI&D as image by following the below steps,
1. List Files
https://api.cognitedata.com/api/v1/projects/{project}/files
2. Convert a diagram to image format
https://api.cognitedata.com/api/v1/projects/{project}/context/diagram/convert/
3. Get the results for converting an engineering diagram to an image
https://api.cognitedata.com/api/v1/projects/{project}/context/diagram/convert/{jobId}
Could you please guide with APIs / JavaScript SDK methods we need to work on for the above mentioned two scenarios.