Create/Update an Entity
POST
Creates or updates an entity.
Consumes
This API v2 call consumes the application/json
media types via the Content-Type request header.
Request Syntax
POST /v2/simpleIngest
Request Body
JSON
Request Example
{
"Description": "Create or update two equipment",
"DataLoaderId": "EquipmentFunctionalLocationLoader",
"Origin": "SimpleIngestion",
"DaysToLive": 15,
"Tables": [
{
"Name": "Configuration",
"Table": [
{
"LOAD_DATA_WORKSHEET": "True",
"DATA_WORKSHEET_ID": "Equipment",
"BATCH_SIZE": "100",
"PRIMARY_FAMILY_ID": "MI_EQUIP000",
"PRIMARY_FAMILY_KEY_FIELDS": "MI_EQUIP000_EQUIP_ID_C|MI_EQUIP000_SAP_SYSTEM_C",
"FAMILY_TYPE": "Entity",
"PRED_FAMILY_ID": "<none>",
"PRED_FAMILY_KEY_FIELDS": "<none>",
"SUCC_FAMILY_ID": "<none>",
"SUCC_FAMILY_KEY_FIELDS": "<none>",
"PRIMARY_ACTION": "ACTION_INSERTUPDATE",
"PRED_ACTION": "ACTION_NONE",
"SUCC_ACTION": "ACTION_NONE",
"OPTION_INSERT_ON_NULL": "True",
"OPTION_UPDATE_ON_NULL": "False",
"OPTION_REPLACE_EXISTING_LINK": "False",
"OPTION_ALLOW_CHANGE_OF_FAMILY": "False"
}
]
},
{
"Name": "Equipment",
"Table": [
{
"MI_EQUIP000_EQUIP_ID_C": "CNTPMP-071-000000000000143171",
"MI_EQUIP000_EQUIP_TECH_NBR_C": "000000000000133171",
"MI_EQUIP000_SAP_SYSTEM_C": "PRF-800",
"MI_SITE_NAME": "PRF-800",
"MI_EQUIP000_MAINT_PLANT_C": "0121",
"MI_EQUIP000_EQUIP_SHRT_DESC_C": "Water recycling system",
"MI_EQUIP000_PRCH_D": "2015-05-23 09:00:00",
"MI_EQUIP000_EQUIP_LNG_DESC_T": "",
"MI_EQUIP000_OBJ_TYP_C": "ROTPMPCNT",
"MI_EQUIP000_SYS_ST_C": "INST",
"MI_EQUIP000_MFR_C": "WESTERN SUPPLY",
"MI_EQUIP000_MOD_NO_C": "",
"MI_EQUIP000_SN_C": "W-3113-1A-97100000",
"MI_EQUIP000_ACTIVE_F": "True",
"MI_EQUIP000_UNIQUE_ID_C": "CNTPMP-071-000000000000143171"
},
{
"MI_EQUIP000_EQUIP_ID_C": "CNTPMP-071-000000000000143172",
"MI_EQUIP000_EQUIP_TECH_NBR_C": "000000000000133172",
"MI_EQUIP000_SAP_SYSTEM_C": "PRF-800",
"MI_SITE_NAME": "PRF-800",
"MI_EQUIP000_MAINT_PLANT_C": "0121",
"MI_EQUIP000_EQUIP_SHRT_DESC_C": "Sweet crude for welded tank",
"MI_EQUIP000_PRCH_D": "2015-05-23 09:00:00",
"MI_EQUIP000_EQUIP_LNG_DESC_T": "",
"MI_EQUIP000_OBJ_TYP_C": "ROTPMPCNT",
"MI_EQUIP000_SYS_ST_C": "INST",
"MI_EQUIP000_MFR_C": "WESTERN SUPPLY",
"MI_EQUIP000_MOD_NO_C": "",
"MI_EQUIP000_SN_C": "W-3113-1A-97100000",
"MI_EQUIP000_ACTIVE_F": "True",
"MI_EQUIP000_UNIQUE_ID_C": "CNTPMP-071-000000000000143172"
}
]
}
]
}
Return Type
200 OK
Produces
This API call produces the application/json
media type according to the Accept request header. The media type will be conveyed by the Content-Type
response header.
Success Response
{
"bundle": {
"id": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"userId": "MIADMIN",
"datasourceId": "20988021-dd02-4aae-9b5d-8b5ce111cf52",
"dataLoaderId": "EquipmentFunctionalLocationLoader",
"origin": "SimpleIngestion",
"created": "2024-08-22T21:11:20.733",
"expires": "2024-09-06T21:11:20.733",
"status": "Initial",
"description": "Create or update two equipment",
"skipSynchronization": false,
"manualRun": false
},
"submittedTables": 2,
"submittedRows": 3
}
Property | Description |
---|---|
id | Bundle Id which is represented by a GUID |
userId | User that ingested the data |
datasourceId | Datasource or Tenant where the data is ingested |
dataLoaderId | Data Loader used to ingest the data |
origin | SimpleIngestion |
created | DateTime of when the Bundle was created |
expires | DateTime of when the Bundle will be removed from the database |
status | (Started, Failed, Completed, CompletedWithRejects, CompletedWithWarnings) |
description | Description provided by the user |
skipSynchronization |
This flag indicates if the Synchronization activity should be skipped. This step should not be skipped as it could cause data integrity issues. |
manualRun | Is this data being loaded manually? True or False |
submittedTables | Number of tables submitted in the SimpleIngest request |
submittedRows | Number of rows submitted in the SimpleIngest request for all tables |
Given that a v2 API request is made asynchronously, if the user wants to check the status of the bundle ingestion, they will need to make an additional request to the following API, passing in the desired Bundle Id: /v1/bundles/778df65d-9c0d-4ad2-9a00-0046ce2a37aa
Success Response
{
"id": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"userId": "MIADMIN",
"datasourceId": "20988021-dd02-4aae-9b5d-8b5ce111cf52",
"dataLoaderId": "EquipmentFunctionalLocationLoader",
"origin": "SimpleIngestion",
"created": "2024-08-23T01:11:20.733",
"expires": "2024-09-07T01:11:20.733",
"status": "Completed",
"description": "Create or update two equipment",
"fileName": "Create or update two equipment_778df65d-9c0d-4ad2-9a00-0046ce2a37aa.zip",
"recipe": {
"deriveDependencies": false,
"maxParallelSlices": 10,
"batchMode": false,
"synchronizeData": false,
"sheetRecipes": [
{
"worksheet": "Equipment.csv",
"loadWorksheet": true,
"gedaFacing": false,
"familyType": "ENTITY",
"loadOrder": 0,
"deleteOrphans": false,
"loadRecordsInParallel": false,
"allowChangeOfFamily": false,
"batchSize": 100,
"insertOnNull": true,
"replaceExistingLink": false,
"updateOnNull": false,
"primaryPlan": {
"genealogy": "Primary",
"action": "ACTION_INSERTUPDATE",
"shouldExist": false,
"id": "MI_EQUIP000",
"keyFieldIds": [
"MI_EQUIP000_EQUIP_ID_C",
"MI_EQUIP000_SAP_SYSTEM_C"
],
"familyType": "ENTITY",
"gedaTypeName": "UNIFIED_ASSET__assettype",
"gedaTypeNameSetByFramework": true,
"gedaFacing": false,
"familyIsDerived": false,
"familyDerivedColumnId": ""
},
"primaryFamily": {
"genealogy": "Primary",
"id": "MI_EQUIP000",
"familyType": "ENTITY",
"gedaTypeName": "UNIFIED_ASSET__assettype",
"gedaFacing": false,
"keyFieldIds": [
"MI_EQUIP000_EQUIP_ID_C",
"MI_EQUIP000_SAP_SYSTEM_C"
],
"keyFields": [
{
"header": "MI_EQUIP000_EQUIP_ID_C",
"fieldId": "MI_EQUIP000_EQUIP_ID_C",
"label": "Equipment ID",
"metaSqlFieldId": "E.[MI_EQUIP000_EQUIP_ID_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": true,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_SAP_SYSTEM_C",
"fieldId": "MI_EQUIP000_SAP_SYSTEM_C",
"label": "CMMS System",
"metaSqlFieldId": "E.[MI_EQUIP000_SAP_SYSTEM_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": true,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
}
],
"fields": [
{
"header": "MI_EQUIP000_EQUIP_ID_C",
"fieldId": "MI_EQUIP000_EQUIP_ID_C",
"label": "Equipment ID",
"metaSqlFieldId": "E.[MI_EQUIP000_EQUIP_ID_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": true,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_EQUIP_TECH_NBR_C",
"fieldId": "MI_EQUIP000_EQUIP_TECH_NBR_C",
"label": "Equipment Technical Number",
"metaSqlFieldId": "E.[MI_EQUIP000_EQUIP_TECH_NBR_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_SAP_SYSTEM_C",
"fieldId": "MI_EQUIP000_SAP_SYSTEM_C",
"label": "CMMS System",
"metaSqlFieldId": "E.[MI_EQUIP000_SAP_SYSTEM_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": true,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_SITE_NAME",
"fieldId": "MI_SITE_NAME",
"label": "Site Name",
"metaSqlFieldId": "E.MI_SITE_KEY",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": true,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_MAINT_PLANT_C",
"fieldId": "MI_EQUIP000_MAINT_PLANT_C",
"label": "Maintenance Plant",
"metaSqlFieldId": "E.[MI_EQUIP000_MAINT_PLANT_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_EQUIP_SHRT_DESC_C",
"fieldId": "MI_EQUIP000_EQUIP_SHRT_DESC_C",
"label": "Equipment Short Description",
"metaSqlFieldId": "E.[MI_EQUIP000_EQUIP_SHRT_DESC_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_PRCH_D",
"fieldId": "MI_EQUIP000_PRCH_D",
"label": "Purchase Date",
"metaSqlFieldId": "E.[MI_EQUIP000_PRCH_D]",
"gedaAttributeName": "",
"metaSqlParameterType": "d",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "Timestamp",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_EQUIP_LNG_DESC_T",
"fieldId": "MI_EQUIP000_EQUIP_LNG_DESC_T",
"label": "Equipment Long Description",
"metaSqlFieldId": "E.[MI_EQUIP000_EQUIP_LNG_DESC_T]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_OBJ_TYP_C",
"fieldId": "MI_EQUIP000_OBJ_TYP_C",
"label": "Object Type",
"metaSqlFieldId": "E.[MI_EQUIP000_OBJ_TYP_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_SYS_ST_C",
"fieldId": "MI_EQUIP000_SYS_ST_C",
"label": "System Status",
"metaSqlFieldId": "E.[MI_EQUIP000_SYS_ST_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_MFR_C",
"fieldId": "MI_EQUIP000_MFR_C",
"label": "Manufacturer",
"metaSqlFieldId": "E.[MI_EQUIP000_MFR_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_MOD_NO_C",
"fieldId": "MI_EQUIP000_MOD_NO_C",
"label": "Model Number",
"metaSqlFieldId": "E.[MI_EQUIP000_MOD_NO_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_SN_C",
"fieldId": "MI_EQUIP000_SN_C",
"label": "Equipment Serial Number",
"metaSqlFieldId": "E.[MI_EQUIP000_SN_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_ACTIVE_F",
"fieldId": "MI_EQUIP000_ACTIVE_F",
"label": "Active",
"metaSqlFieldId": "E.[MI_EQUIP000_ACTIVE_F]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "Boolean",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
},
{
"header": "MI_EQUIP000_UNIQUE_ID_C",
"fieldId": "MI_EQUIP000_UNIQUE_ID_C",
"label": "Unique ID",
"metaSqlFieldId": "E.[MI_EQUIP000_UNIQUE_ID_C]",
"gedaAttributeName": "",
"metaSqlParameterType": "s",
"unitOfMeasureFieldId": "",
"timeZoneFieldId": "",
"fieldType": "String",
"isKey": false,
"determinesUnitOfMeasure": false,
"determinesTimezone": false,
"isSystemField": false,
"mandatory": false,
"multiValue": false,
"readOnly": false,
"dynamic": false
}
],
"familyKey": "64251784124",
"gedaTypeNameSetByFramework": true,
"familyIsDerived": false,
"familyDerivedColumnId": "",
"keyFieldHeaders": [
"MI_EQUIP000_EQUIP_ID_C",
"MI_EQUIP000_SAP_SYSTEM_C"
]
},
"predecessorPlan": {
"genealogy": "Predecessor",
"action": "ACTION_NONE",
"shouldExist": true,
"familyType": "ENTITY",
"gedaTypeNameSetByFramework": false,
"gedaFacing": false,
"familyIsDerived": false
},
"predecessorFamily": {
"genealogy": "Predecessor",
"familyType": "ENTITY",
"gedaFacing": false,
"keyFieldIds": [],
"keyFields": [],
"fields": [],
"gedaTypeNameSetByFramework": false,
"familyIsDerived": false,
"keyFieldHeaders": []
},
"successorPlan": {
"genealogy": "Successor",
"action": "ACTION_NONE",
"shouldExist": true,
"familyType": "ENTITY",
"gedaTypeNameSetByFramework": false,
"gedaFacing": false,
"familyIsDerived": false
},
"successorFamily": {
"genealogy": "Predecessor",
"familyType": "ENTITY",
"gedaFacing": false,
"keyFieldIds": [],
"keyFields": [],
"fields": [],
"gedaTypeNameSetByFramework": false,
"familyIsDerived": false,
"keyFieldHeaders": []
},
"numberOfRowsToChunk": 0,
"rowsAreChunked": false
}
],
"rejectedRows": [],
"warningRows": [],
"ingestionConfiguration": {
"familyFieldsToExclude": [],
"gedaFieldsToExclude": []
}
},
"sliceCount": 1,
"latestTimeStamp": "2024-08-23T01:11:27.511",
"insertedRowCount": 0,
"updatedRowCount": 2,
"deletedRowCount": 0,
"rejectedRowCount": 0,
"events": [
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Transmit",
"status": "Started",
"timeStamp": "2024-08-23T01:11:22.680",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Normalize",
"status": "Started",
"timeStamp": "2024-08-23T01:11:23.624",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Transmit",
"status": "Completed",
"timeStamp": "2024-08-23T01:11:23.993",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Normalize",
"status": "Completed",
"timeStamp": "2024-08-23T01:11:24.204",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Compile",
"status": "Started",
"timeStamp": "2024-08-23T01:11:24.228",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Compile",
"status": "Completed",
"timeStamp": "2024-08-23T01:11:25.856",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Slice",
"status": "Started",
"timeStamp": "2024-08-23T01:11:25.875",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Slice",
"status": "Completed",
"timeStamp": "2024-08-23T01:11:26.765",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Ingest",
"status": "Started",
"timeStamp": "2024-08-23T01:11:26.782",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Ingest",
"status": "Completed",
"timeStamp": "2024-08-23T01:11:28.163",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Synchronize",
"status": "Started",
"timeStamp": "2024-08-23T01:11:28.182",
"progressPercentage": 100.0
},
{
"bundleId": "778df65d-9c0d-4ad2-9a00-0046ce2a37aa",
"activity": "Synchronize",
"status": "Completed",
"timeStamp": "2024-08-23T01:11:28.948",
"progressPercentage": 100.0
}
],
"skipSynchronization": false,
"manualRun": false,
"progressPercentage": 100