Creating locations by using the UI
You can create a file that contains the list of locations and upload the file to IBM Environmental Intelligence Suite.
About this task
Each asset must be associated with a location object in Infohub. You can use a .json file to upload location objects to Infohub and provide the locationIdentifier attribute to associate each location to an asset. You import the file in the Job management component and verify that the locations are created in the Data explorer.
You can create a location in .json format by following this example:
{"eventCode": "objectUpsertEvent", "tenantId": "UNKNOWN-TENANT", "eventDetails": {"businessObject":
{"locationIdentifier": "cf88ffdb-fc65-4c29-bdb3-e5d25e54b05e", "locationName": "cf88ffdb-fc65-4c29-bdb3-
e5d25e54b05e", "locationType": "ALERT ASSET", "type": "Location", "city": "Mckinney", "country": "United states",
"globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "cf88ffdb-fc65-4c29-bdb3-e5d25e54b05e"}],
"coordinates": "33.18646,-96.649831", "address1": "2205 Misty Way", "postalCode": "75072", "stateProvince":
"Texas"}}}
{"eventCode": "objectUpsertEvent", "tenantId": "UNKNOWN-TENANT", "eventDetails": {"businessObject":
{"currentLocationCoordinates": "33.18646,-96.649831", "assetIdentifier": "0a500fba-7c60-627f-1bc5-
f5df286ae336", "type": "Asset", "description": "2205 Misty way", "globalIdentifiers": [{"name":
"eis.geospatial.globalId", "value": "0a500fba-7c60-627f-1bc5-f5df286ae336"}], "location": {"locationIdentifier":
"cf88ffdb-fc65-4c29-bdb3-e5d25e54b05e"}, "assetType": "STATIC", "status": "active", "contacts":
[{"globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "AXi0FZcbzj9NPn54br_Z"}]}]}}}
Procedure
- Prepare a locations file by using the file format in the About this task section.
- From the side navigation menu, click New job. and then click
- Select Import data as the job type and click Next.
- Click Add file and browse to upload your .csv or .json file.
- Select the default schema type and click Next.
- Review your data and click Import.
Results
The status is changed to Completed when the import is done.
What to do next
To delete assets by using a file, define the same configuration, but in the Job
Management component, select Delete data. In the
.json file, set the event code to objectArchiveEvent
.