This API runs an OMI Import job in Smart Materials. It supports the Continue Job functionality of SMat Classic and all the three modes (Online, Batch, and Schedule).
This API supports only Smart Materials 2020 (10.0) version.
Mode |
Mode Description |
Execution Conditions |
Online |
Job starts immediately |
If value for Prefer in Headers and Schedule time in request body, both are not passed |
Batch |
Job starts immediately but in the background |
If value for Prefer is respond-async but Schedule time in request body is not passed |
Schedule |
Job starts at the scheduled time in the background |
If value for Prefer is respond-async and Schedule time in request body is also passed |
-
You can run only those OMI Import jobs that have Data source as Flat Load Configuration (FLC), and the FLC Load option as ASCII or EXCEL or CIP. However, FLC Load option as CIP is supported only in Online mode.
-
Start OMI job supports BOM queuing. For details, see BOM Queuing .
Required Privilege: API_BOM
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Prefer |
Indicates the server behavior that is preferred by the client |
Optional |
respond-async |
Body
URL:POST https://localhost:59387/smat/v1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/OMIImportJobs({OMIJId})/StartOMIJob()
Specify values for the project, discipline, and language in the URL. The project, discipline, and language together, define the project environment and the key parameter defines the OMI Import job Id (OMIJId).
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
OMIJId |
Unique ID of the OMI Import job |
Integer |
Required |
|
ScheduleDetails |
Schedule details of the job when the operating mode is Schedule |
Object |
Optional |
|
ScheduleTime |
Time when the job should run or start |
Date Time Offset |
Optional |
|
Comments |
Any comments given by the user |
String |
Optional |
Sample Code
POST https://localhost:59387/smat/v1/Projects('RS')/Disciplines('ELECTRICAL')/Nls('English')/OMIImportJobs(10000021577)/StartOMIJob()
{
"ScheduleDetails":
{
"ScheduleTime": "2019-08-30T18:00:00Z",
"Comments": "Test Run"
}
}
Request body is required only for Schedule mode.
Success Response
Status: 200 OK
{
"@odata.context": "https://localhost:59387/SMAT/V1/$metadata#Edm.String",
"value": "The Import Job finished with return status SCHEDULED."
}
Where value represents the job status.
-
To view the status of the OMI Import job, use:
GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/OMIImportJobs({key}.
-
You can view the import logs in the path provided within the DBA setting:
-
In LOG_FILE_DEST, log files named FLC_xx and FLC_ERR_RPT_xx are created
-
In BOM_IMPORT_PATH, log files names API_START_OMI_xx are created, and here xx represents the ID.
-