Re-start an Open MTO Interface Import job - Intergraph Smart Materials - Version 2017 R2 (2.2) - Help - Hexagon

Intergraph Smart Materials Web API Help 2017 R2 (2.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Version Smart Materials Web API
2017 R2 (2.2)

This API re-starts an OMI Import job in Smart Materials and supports all the three modes (Online, Batch, and Schedule).

SHARED Tip In Classic, whenever you start any OMI job, if some fatal error (like out of rollback space, tablespace full or similar problems) occurs, then RestartableInd is set to Y automatically, and import program is terminated. In such situation, you can use re-start OMI job API.

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 re-start only that OMI Import job that has Data source as Flat Load Configuration (FLC) and FLC Load option as ASCII or EXCEL or CIP. However, FLC Load option as CIP is supported only in Online mode.

  • Re-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 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})RestartOMIJob()

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 64

Required

ScheduleDetails

Schedule details of a re-start job when the operating mode is Schedule

Object

Optional

ScheduleTime

Time when the job should 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)/RestartOMIJob()

{

    "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."

}

  • 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.