Export Exposures
Overview
The Risk Modeler API enables you to create backups of cloud-based EDMs and download those backups from the Intelligent Risk Platform.
EDMs may be downloaded as database artifacts in the BAK
, CSV
, MDF
or PARQUET
file formats. Downloaded database artifacts may be imported into on-premise SQL Server instances.
Step 1: Download EDM as database artifact
The Manage EDM operation supports two administrative tasks: the creation of an EDM on the Intelligent Risk Platform or the downloading of an EDM as a database artifact from the Intelligent Risk Platform. Each task is identified by an operation type that is specified as a query parameter.
The datasource
and operation
query parameters are required:
curl --location --request POST 'https://{host}/riskmodeler/v1/datasources?datasourcename=edm_name&operation=DOWNLOAD_EDM' \
--header 'Authorization: {api_key}' \
--data-raw ''
The operation the following query parameters:
- The required
operation
query parameter specifies the action taken on the EDM (one ofCREATE
orDOWNLOAD_EDM
). In this case, we want to download the EDM, so we have specified a value ofDOWNLOAD_EDM
. IfDOWNLOAD_EDM
is specified, the operation creates a backup of the specified EDM in the specified format. - The required
datasourcename
query parameter identifies the EDM to download. - The
format
parameter specifies file format of the exported data. One ofBAK
,CSV
,MDF
orPARQUET
. - The optional
filename
query parameter specifies the name of the database artifact. The name of the database artifact must be name that is valid for an EDM. Valid characters:0
-9
,A
-Z
,a
-z
,_
(underscore),-
(hyphen), and ' ' (blank space). Maximum length is 80 characters. - The optional
servername
query parameter specifies the name of the server instance that hosts the EDM. If no server instance is specified, the tenant's primary EDM is assumed. - The optional
sqlversion
query parameter specifies compatibility of BAK or MDF database artifacts. One or2014
or2019
.
If successful, returns a 202 Accepted
HTTP response and initates a DOWNLOAD_EDM
job on the workflow engine. The job ID number is returned in the Location
HTTP header.
Step 2: Retrieve database artifact location
The Get workflow or operation operation enables you to request information about the status of a specific job.
To retrieve information about a job, specify the job ID as a path parameter. Use the job ID, you retrieved from the Location
HTTP header in Step 1.
curl --request GET \
--url https://{host}/riskmodeler/v1/workflows/5673 \
--header 'Accept: application/json' \
--header 'Authorization: XXXXXXXXXX'
A successful response returns the Workflow object, which provides detailed information about this job including the submitTime
, startTime
, type
, and status
. When the status is set to FINISHED
, the database artifact is available for download.
{
"id": 0,
"tenantName": "string",
"userName": "string",
"status": "FINISHED",
"submitTime": "string",
"startTime": "string",
"endTime": "string",
"name": "string",
"type": "string",
"jobs": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"taskId": 0,
"workflowId": 0,
"status": "string",
"submitTime": "string",
"createdAt": "string",
"name": "string",
"input": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"output": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"priorJobs": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"percentComplete": 0
}
],
"summary": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"progress": 0,
"messages": [
{
"message": "string",
"type": "string"
}
]
}
Updated 8 months ago