Arguments in the body
The arguments block is used when executing a BOM that needs arguments.
In the JSON documentation, all arguments are listed with their respective BOMs. And when arguments are missing in a request, the error message will show their names.
Example - deep copy asset
/execute/UsrAsset/BomDeepCopy: Making a deep copy of an asset with syscode 766.
{
"filter": {
"Syscode": {
"eq": 766
}
},
"arguments": {
"BOType.AssetMaintenanceChecklistItem": false,
"BOType.AssetMaintenanceServicePlan": true,
"BOType.CounterMeter": false,
"BOType.DefectListBaseAsset": false,
"BOType.GaugeMeter": false,
"BOType.Hazard": true,
"BOType.InventoryItem": false,
"BOType.InventoryItemComponent": true,
"BOType.MaintenanceActivityDefinitionAdditionalCosts": false,
"BOType.MaintenanceActivityDefinitionManHourCosts": false,
"BOType.MaintenanceActivityDefinitionMaterialCosts": true,
"BOType.StdMaintenanceServicePlanAsset": true,
"CopyNumber": 1,
"DestPropertyRef": 6,
"NrCopies": 1,
"copyDivergentDataLinkedSrvPlan": false
}
}
Example - apply standard service plan
Apply standard service plan 670 to contract line 325 and take over the checklist items from the contract maintenance activity definition.
/execute/ContractMaintenanceServicePlan/BomApplyStandardServiceplan
{
"arguments": {
"ARG_STANDARDSERVICEPLAN_REF": 670,
"ARG_ADDITIONALCOSTS": true,
"ARG_ASSETS": false,
"ARG_ASSETS_LINKED_CL": false,
"ARG_CHKITEMS": "MAKE_SPECIFIC_FOR_CMAD",
"ARG_CONTRACTLINE_REF": 325,
"ARG_MANHOURCOST": true,
"ARG_MATERIALCOST": false
}
}
ARG_STANDARDSERVICEPLAN_REF currently supports only a single Standard Maintenance Service Plan, even though the UI dialog allows multiple selections. This limitation occurs because the API does not yet support arrays.
ARG_CHKITEMS is an enum, the possible values are:
• USE_FROM_SMAD
This option will use the standard maintenance activity definition's checklist items.
• MAKE_SPECIFIC_FOR_CMAD
This option copies the checklist items from the standard maintenance activity definition to the contract maintenance activity definition, allowing you to tailor them to the specific needs of the contract.