Skip to content

Asset Vertical Samples

Create new asset

  1. Look for POST /assets.
  2. Copy and edit the example value below into Notepad/Editor. Remember to update event time, created time, and origin date to current date and time.
  3. Run the POST call.

    {   
        "level": "ENTERPRISE",
        "external-ids": [
            {
                "key": "idName",
                "value": "123"
            }
        ],
        "name": "myAsset",
        "description": "my test asset",
        "properties": [
            {
                "identifier": "Business Units",
                "description": "Number of Units",
                "value-type": "LONG",
                "value": 100
            },
            {
                "identifier": "Business Name",
                "description": "Company Name",
                "value-type": "STRING",
                "value": "ACME"
            },
            {
                "identifier": "Velocity",
                "unit": "m/s",
                "value-type": "DOUBLE",
                "value": 3.4
            }
        ],
        "incoming-links": [
            {
                "asset-id": "111",
                "description": "Material Flow",
                "properties": [
                    {
                        "identifier": "Throughput",
                        "unit": "units per second",
                        "description": "Material flow over this Connection",
                        "value-type": "LONG",
                        "value": 10
                    }
                ],
                "link-classes": [
                    "Chute"
                ]
            }
        ],
        "outgoing-links": [
            {
                "asset-id": "222",
                "description": "Material Flow",
                "properties": [
                    {
                        "identifier": "Throughput",
                        "unit": "units per second",
                        "description": "Material flow over this Connection",
                        "value-type": "LONG",
                        "value": 10
                    }
                ],
                "link-classes": [
                    "Chute"
                ]
            }
        ]
    }
    

Create new metering event

  1. Look for POST /meterings/events.
  2. Copy and edit the example value below into Notepad/Editor. Remember to update event time, created time, and origin date to current date and time.
  3. Run the POST call.

    {
        "event-type": "SYSTEM_METERING_EVENT",
        "event-time": "2999-03-26T07:32:02.218Z",
        "location": "AT3",
        "source": "BHS",
        "start": "2999-03-26T07:32:02.218Z",
        "end": "2999-03-26T07:32:02.218Z",
        "metering": {
            "NO_LOAD_CURRENT": {
            "abs": 23.5,
                "unit": "AMPERE",
                "power-of-ten": -3
            }
        }
    }
    

Query posted metering event

  1. Run GET /meterings/events with the following parameters:

    {
        "location": "AT3", 
        "source": "BHS",
        "metering-type": "NO_LOAD_CURRENT"
    }
    
  2. You should find the metering event you previously created in the response body.