You may wish to capture the threat model diagram via the API. This article will explain the basics.
Permissions and configuration:
- active API token
- access rights (ownership, BU etc) to the project
- GLOBAL permission: API_ACCESS
- Setting enabled: API Access (Settings > API > API Enabled)
Inside your API software of choice, configure for appropriate project:
- base url
Call the following GET request:
Send the request. Below is the output:
These steps can also be done via the console if required.
WARNING: These steps will differ based on OS & distribution so please refer to your distribution documentation. This walkthrough is done via an ubuntu distribution.
First navigate to the folder you wish to save the image in. This cannot be viewed natively in most consoles so we must specify an output.
Then run the following command
curl https://<base-url>.iriusrisk.com/api/v1/products/<product-id>/diagram/image --header "api-token: <your-api-token>" --header "Content-Type: application/json" > filename.png
Below is the output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 103k 100 103k 0 0 122k 0 --:--:-- --:--:-- --:--:-- 121k
and opening the file: