To import metadata using OIC - RESTApi, we can use below to automate the process.
To execute Import metadata, POST
/HyperionPlanning/rest/v3/applications/<appName>/jobs
Request:
{
"jobType": "IMPORT_METADATA",
"jobName": "ImportMetaDataJob",
"parameters": {
"errorFile":"ImportMetaDataErrorFile.zip",
"importZipFileName": "myMetaDataDailyJob.zip"
}
}
Response:
{
"status" : 0,
"details" : "",
"jobId" : 224,
"jobName" : ""
}
To check status: GET
/HyperionPlanning/rest/v3/applications/<appName>/jobs/{jobIdentifier}/details
Response:
{
"items" : [ {
"recordsRead" : 0,
"recordsRejected" : 0,
"recordsProcessed" : 0,
"dimensionName" : "Dep",
"loadType" : "Metadata Import"
} ]
}
- Post - import metadata
- Get - Status
- Switch - if recordsRejected is 0, then success, Otherwise failed.
Thanks,
Mady