Reference 360 > Reference 360 REST API > asset optimization modelling
  

asset optimization modelling

Use this resource to enable asset optimization option on the user interface. You can use the asset optimization modelling REST API to optimize the existing code lists and hierarchies. You can also retrieve the status of an asset optimization modelling job.
When the volume of reference data is high, use asset optimization once for your organization.
Note: The loading time and performance improvement might depend on your environment and network latency.

Enable the asset optimization option

By default, the asset optimization option isn't available in the user interface. You must enable it by running the asset optimization modeling REST API. The REST API also analyzes the number of assets to be optimized and sets them up for optimization. When you run the asset optimization modeling REST API, it triggers an asset optimization modeling job.
Enabling the asset optimization option is a one-time activity for an organization.

POST request

To enable the asset optimization option and to run an asset optimization modeling job, submit a POST request with the following URI:
/rdm-service/external/v1/asset/optimization/modelling

POST response

The response is in the JSON format.
The following table describes the attributes in the response:
Field
Type
Description
jobId
String
ID of the asset optimization modeling job.
type
String
Type of the job, such as asset optimization modeling.
status
String
Status of the asset optimization modeling job. Value can be RUNNING, SUCCESS, FAILED, or CANCELLED.
createdBy
String
User name of the user who triggered the asset optimization modeling job.
createdDate
String
Date when the user ran the asset optimization modeling job.

POST example

To enable the asset optimization option, you might use the following request:
{
"method":"POST",
"url":"https://qa-pod1-mdm.mrel.infaqa.com/rdm-service/external/v1/asset/optimization/modelling",
"headers":{
"accept":"application/json",
"Session ID":"XXXXXXXXXXXXXXXXXXXXXX"
},
"data":""
}
The following sample response shows the details of an asset optimization modeling report:
{
"jobId": "663a68d9ec6cff7ea71b48ed",
"type": "ASSET_OPTIMIZATION_MODELLING",
"status": "RUNNING",
"createdBy": "cLuE2VONraVl6EjvWO9Hw5",
"createdDate": "2024-05-07T17:46:01.768+00:00"
}

Get asset modeling job status

Retrieves the status of an asset optimization modeling job and the number of assets that the job processed..

GET request

To get the status of an asset optimization modeling job, submit a GET request with the following URI:
/rdm-service/external/v1/asset/optimization/modelling/job/{jobId}

GET response

The response contains the details of an asset optimization modeling job, such as status of the job, created date, and number of code lists and hierarchies that can be optimized.
The following table describes the attributes in the response:
Field
Type
Description
jobId
String
ID of the asset optimization modeling job.
type
String
Type of the job, such as asset optimization modeling.
status
String
Status of the asset optimization modeling job. Values can be RUNNING, SUCCESS, FAILED, or CANCELLED.
createdBy
String
User name of the user who triggered the asset optimization modeling job.
createdDate
String
Date when the user ran the asset optimization modeling job.
detail
-
Details of a job at a specific time.
numberOfCodelistModelled
Integer
Number of code lists that are ready to be optimized.
numberOfHierarchyModelled
Integer
Number of hierarchies that are ready to be optimized.
errors
-
Details of the error that the REST API request returns.
errorCode
String
Error code for the error type.
errorSummary
String
Message that explains why the invalid records couldn't be set up for optimization.
errorParameter
String
Parameter that provides details of an error.
errorCauses
String
Causes of the error to explain why the assets couldn't be set up for optimization.

GET example

To get the status of an asset optimization modeling job, you might use the following request:
{
"method": "GET",
"url": "https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/asset/optimization/modelling/job/97d517fc22a78aea89646b1na",
"protocol": "HTTP/1.1",
"headers": {
"IDS-SESSION-ID": "XXXXXXXXXXXXXXXXXXXXXX"
}
}
The following sample response shows the status of an asset optimization modeling job:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 193

{
"jobId":"663a68d9ec6cff7ea71b48ed",
"type":"ASSET_OPTIMIZATION_MODELLING",
"status":"SUCCESS",
"createdBy":"cLuE2VONraVl6EjvWO9Hw5",
"createdDate":"2024-05-07T17:46:01.768+00:00",
"detail":{
"numberOfCodelistModelled":0,
"numberOfHierarchyModelled":0
}
}