Introduction
This support article will guide you through the process of exporting an IriusRisk project as an OTM (YAML format) file via the API. For the purpose of this article, we will use the cURL command-line tool along with the API endpoint https://<your_instance>.iriusrisk.com/api/v1/products/otm/<project_ID>'
.
Ensure you have the required permissions—specifically API_ACCESS
and PRODUCT_EXPORT
—before proceeding.
Prerequisites
- Access to the IriusRisk instance, with API access enabled.
- cURL installed on your machine.
- The project you want to export in a SYNCED state
API_ACCESS
andPRODUCT_EXPORT
permissions
Step by Step
Step 1: If you have not done so already, Enable API & Generate an API Token
Step 2: Open your terminal or command prompt and run the following cURL command:
curl -X 'GET' 'https://<your_instance>.iriusrisk.com/api/v1/products/otm/<project_ID>' \
-H 'accept: text/plain,application/json' \
-H 'api-token: <YOUR_TOKEN>' > exported_project.yaml
Replace <your_instance>
with the actual URL of your IriusRisk instance, <YOUR_TOKEN>
with your API token & <project_ID>
with your Project ID.
Conclusion
By following these steps, you have successfully called the IriusRisk API to export a project as an OTM file using cURL. The exported project is now available in the specified YAML file for further use or analysis.
Comments
0 comments
Please sign in to leave a comment.