Create/Update a Relationship

POST

Creates or updates the predecessor, successor and any relationships.

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": "Link Functional Locations to Equipment",
  "DataLoaderId": "EquipmentFunctionalLocationLoader",
  "Origin": "SimpleIngestion",
  "DaysToLive": 15,
  "Tables": [
    {
      "Name": "Configuration",
      "Table": [
        {
          "LOAD_DATA_WORKSHEET": "True",
          "DATA_WORKSHEET_ID": "FuncLocsToEquipment",
          "BATCH_SIZE": "100",
          "PRIMARY_FAMILY_ID": "MIR_FLHSEQ",
          "PRIMARY_FAMILY_KEY_FIELDS": "<none>",
          "FAMILY_TYPE": "Relationship",
          "PRED_FAMILY_ID": "MI_FNCLOC00",
          "PRED_FAMILY_KEY_FIELDS": "MI_FNCLOC00_INTERNAL_ID_C|MI_FNCLOC00_SAP_SYSTEM_C",
          "SUCC_FAMILY_ID": "MI_EQUIP000",
          "SUCC_FAMILY_KEY_FIELDS": "MI_EQUIP000_EQUIP_ID_C|MI_EQUIP000_SAP_SYSTEM_C",
          "PRIMARY_ACTION": "ACTION_INSERTUPDATE",
          "PRED_ACTION": "ACTION_INSERTUPDATE",
          "SUCC_ACTION": "ACTION_INSERTUPDATE",
          "OPTION_INSERT_ON_NULL": "True",
          "OPTION_UPDATE_ON_NULL": "False",
          "OPTION_REPLACE_EXISTING_LINK": "True",
          "OPTION_ALLOW_CHANGE_OF_FAMILY": "False"
        }
      ]
    },
    {
      "Name": "FuncLocsToEquipment",
      "Table": [
        {
          "MI_FNCLOC00|MI_FNCLOC00_INTERNAL_ID_C": "IF0000000009056820",
          "MI_FNCLOC00|MI_FNCLOC00_FNC_LOC_C": "REFN-RF997-E0012A-097",
          "MI_FNCLOC00|MI_FNCLOC00_SAP_SYSTEM_C": "PRF-800",
          "MI_FNCLOC00|MI_FNCLOC00_UNIQUE_ID_C": "REFN-RF997-E0012A-097",
          "MI_EQUIP000|MI_EQUIP000_EQUIP_ID_C": "SBX-071-000000000000133174",
          "MI_EQUIP000|MI_EQUIP000_SAP_SYSTEM_C": "PRF-800",
          "MI_EQUIP000|MI_EQUIP000_UNIQUE_ID_C": "SBX-071-000000000000133174"
        },
        {
          "MI_FNCLOC00|MI_FNCLOC00_INTERNAL_ID_C": "IF0000000009056820",
          "MI_FNCLOC00|MI_FNCLOC00_FNC_LOC_C": "REFN-RF997-E0012A-097",
          "MI_FNCLOC00|MI_FNCLOC00_SAP_SYSTEM_C": "PRF-800",
          "MI_FNCLOC00|MI_FNCLOC00_UNIQUE_ID_C": "REFN-RF997-E0012A-097",
          "MI_EQUIP000|MI_EQUIP000_EQUIP_ID_C": "SBX-071-000000000000134876",
          "MI_EQUIP000|MI_EQUIP000_SAP_SYSTEM_C": "PRF-800",
          "MI_EQUIP000|MI_EQUIP000_UNIQUE_ID_C": "SBX-071-000000000000134876"
        }
      ]
    }
  ]
}

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": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
        "userId": "MIADMIN",
        "datasourceId": "20988021-dd02-4aae-9b5d-8b5ce111cf52",
        "dataLoaderId": " EquipmentFunctionalLocationLoader ",
        "origin": "SimpleIngestion",
        "created": "2024-08-09T18:44:17.326",
        "expires": "2024-08-29T18:44:17.326",
        "status": "Initial",
        "description": " Link Functional Locations to Equipment ",
        "skipSynchronization": false,
        "manualRun": false
    },
    "submittedTables": 2,
    "submittedRows": 3
}
Table 1. Explanation of the response properties
PropertyDescription
idBundle Id which is represented by a GUID
userIdUser that ingested the data
datasourceIdDatasource or Tenant where the data is ingested
dataLoaderIdData Loader used to ingest the data
originSimpleIngestion
createdDateTime of when the Bundle was created
expiresDateTime of when the Bundle will be removed from the database
status(Started, Failed, Completed, CompletedWithRejects, CompletedWithWarnings)
descriptionDescription 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.

manualRunIs this data being loaded manually? True or False
submittedTablesNumber of tables submitted in the SimpleIngest request
submittedRowsNumber 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/3dcce69e-9038-4cea-bb39-fae88d1f6762

Success Response

{
    "id": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
    "userId": "MIADMIN",
    "datasourceId": "20988021-dd02-4aae-9b5d-8b5ce111cf52",
    "dataLoaderId": "EquipmentFunctionalLocationLoader",
    "origin": "SimpleIngestion",
    "created": "2024-08-22T23:36:13.241",
    "expires": "2024-09-06T23:36:13.241",
    "status": "Completed",
    "description": "Link Functional Locations to Equipment",
    "fileName": "Link Functional Locations to Equipment_3dcce69e-9038-4cea-bb39-fae88d1f6762.zip",
    "recipe": {
        "deriveDependencies": false,
        "maxParallelSlices": 10,
        "batchMode": false,
        "synchronizeData": false,
        "sheetRecipes": [
            {
                "worksheet": "FuncLocsToEquipment.csv",
                "loadWorksheet": true,
                "gedaFacing": false,
                "familyType": "RELATIONSHIP",
                "loadOrder": 0,
                "deleteOrphans": false,
                "loadRecordsInParallel": false,
                "allowChangeOfFamily": false,
                "batchSize": 100,
                "insertOnNull": true,
                "replaceExistingLink": true,
                "updateOnNull": false,
                "primaryPlan": {
                    "genealogy": "Primary",
                    "action": "ACTION_INSERTUPDATE",
                    "shouldExist": false,
                    "id": "MIR_FLHSEQ",
                    "keyFieldIds": [],
                    "familyType": "RELATIONSHIP",
                    "gedaTypeNameSetByFramework": false,
                    "gedaFacing": false,
                    "familyIsDerived": false,
                    "familyDerivedColumnId": ""
                },
                "primaryFamily": {
                    "genealogy": "Primary",
                    "id": "MIR_FLHSEQ",
                    "familyType": "RELATIONSHIP",
                    "gedaFacing": false,
                    "keyFieldIds": [],
                    "keyFields": [],
                    "fields": [],
                    "familyKey": "64251800815",
                    "gedaTypeNameSetByFramework": false,
                    "familyIsDerived": false,
                    "familyDerivedColumnId": "",
                    "keyFieldHeaders": []
                },
                "predecessorPlan": {
                    "genealogy": "Predecessor",
                    "action": "ACTION_INSERTUPDATE",
                    "shouldExist": false,
                    "id": "MI_FNCLOC00",
                    "keyFieldIds": [
                        "MI_FNCLOC00_INTERNAL_ID_C",
                        "MI_FNCLOC00_SAP_SYSTEM_C"
                    ],
                    "familyType": "ENTITY",
                    "gedaTypeNameSetByFramework": false,
                    "gedaFacing": false,
                    "familyIsDerived": false,
                    "familyDerivedColumnId": ""
                },
                "predecessorFamily": {
                    "genealogy": "Predecessor",
                    "id": "MI_FNCLOC00",
                    "familyType": "ENTITY",
                    "gedaFacing": false,
                    "keyFieldIds": [
                        "MI_FNCLOC00_INTERNAL_ID_C",
                        "MI_FNCLOC00_SAP_SYSTEM_C"
                    ],
                    "keyFields": [
                        {
                            "header": "MI_FNCLOC00|MI_FNCLOC00_INTERNAL_ID_C",
                            "fieldId": "MI_FNCLOC00_INTERNAL_ID_C",
                            "label": "Functional Location Internal ID",
                            "metaSqlFieldId": "E.[MI_FNCLOC00_INTERNAL_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_FNCLOC00|MI_FNCLOC00_SAP_SYSTEM_C",
                            "fieldId": "MI_FNCLOC00_SAP_SYSTEM_C",
                            "label": "CMMS System",
                            "metaSqlFieldId": "E.[MI_FNCLOC00_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_FNCLOC00|MI_FNCLOC00_INTERNAL_ID_C",
                            "fieldId": "MI_FNCLOC00_INTERNAL_ID_C",
                            "label": "Functional Location Internal ID",
                            "metaSqlFieldId": "E.[MI_FNCLOC00_INTERNAL_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_FNCLOC00|MI_FNCLOC00_FNC_LOC_C",
                            "fieldId": "MI_FNCLOC00_FNC_LOC_C",
                            "label": "Functional Location",
                            "metaSqlFieldId": "E.[MI_FNCLOC00_FNC_LOC_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_FNCLOC00|MI_FNCLOC00_SAP_SYSTEM_C",
                            "fieldId": "MI_FNCLOC00_SAP_SYSTEM_C",
                            "label": "CMMS System",
                            "metaSqlFieldId": "E.[MI_FNCLOC00_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_FNCLOC00|MI_FNCLOC00_UNIQUE_ID_C",
                            "fieldId": "MI_FNCLOC00_UNIQUE_ID_C",
                            "label": "Unique ID",
                            "metaSqlFieldId": "E.[MI_FNCLOC00_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": "64251789393",
                    "gedaTypeNameSetByFramework": false,
                    "familyIsDerived": false,
                    "familyDerivedColumnId": "",
                    "keyFieldHeaders": [
                        "MI_FNCLOC00|MI_FNCLOC00_INTERNAL_ID_C",
                        "MI_FNCLOC00|MI_FNCLOC00_SAP_SYSTEM_C"
                    ]
                },
                "successorPlan": {
                    "genealogy": "Successor",
                    "action": "ACTION_INSERTUPDATE",
                    "shouldExist": false,
                    "id": "MI_EQUIP000",
                    "keyFieldIds": [
                        "MI_EQUIP000_EQUIP_ID_C",
                        "MI_EQUIP000_SAP_SYSTEM_C"
                    ],
                    "familyType": "ENTITY",
                    "gedaTypeNameSetByFramework": false,
                    "gedaFacing": false,
                    "familyIsDerived": false,
                    "familyDerivedColumnId": ""
                },
                "successorFamily": {
                    "genealogy": "Successor",
                    "id": "MI_EQUIP000",
                    "familyType": "ENTITY",
                    "gedaFacing": false,
                    "keyFieldIds": [
                        "MI_EQUIP000_EQUIP_ID_C",
                        "MI_EQUIP000_SAP_SYSTEM_C"
                    ],
                    "keyFields": [
                        {
                            "header": "MI_EQUIP000|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|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|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|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_EQUIP000|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": false,
                    "familyIsDerived": false,
                    "familyDerivedColumnId": "",
                    "keyFieldHeaders": [
                        "MI_EQUIP000|MI_EQUIP000_EQUIP_ID_C",
                        "MI_EQUIP000|MI_EQUIP000_SAP_SYSTEM_C"
                    ]
                },
                "numberOfRowsToChunk": 0,
                "rowsAreChunked": false
            }
        ],
        "rejectedRows": [],
        "warningRows": [],
        "ingestionConfiguration": {
            "familyFieldsToExclude": [],
            "gedaFieldsToExclude": []
        }
    },
    "sliceCount": 1,
    "latestTimeStamp": "2024-08-22T23:36:21.229",
    "insertedRowCount": 2,
    "updatedRowCount": 0,
    "deletedRowCount": 0,
    "rejectedRowCount": 0,
    "events": [
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Transmit",
            "status": "Started",
            "timeStamp": "2024-08-22T23:36:15.285",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Transmit",
            "status": "Completed",
            "timeStamp": "2024-08-22T23:36:16.064",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Normalize",
            "status": "Started",
            "timeStamp": "2024-08-22T23:36:16.744",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Normalize",
            "status": "Completed",
            "timeStamp": "2024-08-22T23:36:17.485",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Compile",
            "status": "Started",
            "timeStamp": "2024-08-22T23:36:17.510",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Compile",
            "status": "Completed",
            "timeStamp": "2024-08-22T23:36:18.417",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Slice",
            "status": "Started",
            "timeStamp": "2024-08-22T23:36:18.481",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Slice",
            "status": "Completed",
            "timeStamp": "2024-08-22T23:36:19.485",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Ingest",
            "status": "Started",
            "timeStamp": "2024-08-22T23:36:19.509",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Ingest",
            "status": "Completed",
            "timeStamp": "2024-08-22T23:36:21.957",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Synchronize",
            "status": "Started",
            "timeStamp": "2024-08-22T23:36:21.980",
            "progressPercentage": 100.0
        },
        {
            "bundleId": "3dcce69e-9038-4cea-bb39-fae88d1f6762",
            "activity": "Synchronize",
            "status": "Completed",
            "timeStamp": "2024-08-22T23:36:22.763",
            "progressPercentage": 100.0
        }
    ],
    "skipSynchronization": false,
    "manualRun": false,
    "progressPercentage": 100
}