post observation-summary-metrics Endpoint

Sends alert data from activity monitoring devices to PULSE.

POST https://integrations.prod.vas.com/api/batches/locations/com.vas.dairies.id/{location-id}/observation-summary-metrics

IMPORTANT: VAS currently supports the following data point for use in PULSE and DairyComp reports and worklists: 

When aggregation=SUM and isIncomplete=FALSE

  • metric id: populates as Rumination time, 24-hour Rumination time, Eating time, 24-hour Eating time, Inactive time, and 24-hour Inactive time.

All other data sent to VAS will not be visible from PULSE and DairyComp.

Parameters (required)

In addition to the standard Authorization and API Key header parameters, the following are required: 

{location-id}integerREQUIRED

VAS-specificClosed A data value that originates from the VAS product line. [dairy] location identifier. For routes with “com.vas.dairies.id”, {location-id} is a VAS-specific dairy id.

ContentTypestringREQUIRED

Use application/json

Request bodyREQUIRED

Format required for the POST request. See the details below in the Request Schema.

Request Schema

curl -X POST 
'https://integrations.prod.vas.com/api/batches/locations/com.vas.dairies.id/{location-id}/observation-summary-metrics'  \
-H 'Authorization: bearer {authorization token}'  \
-H 'X-API-Key: {API key}'  \
-H 'Content-Type: application/json'  \
--data-raw '{
[
    {
        "resourceType": "icarResourceType",
        "meta": {
            "source": "10.1.1.123",
            "sourceId": "10.1.1.234",
            "isDeleted": false,
            "modified": "2024-04-30T14:54:07.609Z",
            "created": "2024-04-30T14:54:07.609Z",
            "creator": "Technician123",
            "validFrom": "2024-04-30T14:54:07.609Z",
            "validTo": "2024-04-30T14:54:07.609Z"
        },
        "location": {
            "id": "{location}",
            "scheme": "com.vas.dairies.id"
        },
      
        "animal": {
            "id": "123456789",
            "scheme": "com.vas.animals.id"
        },
	"statistics": 
	{
            "startDateTime": "2024-10-04T14:54:07.609Z",
            "duration": "1D",
            "isInComplete": false,
            "metric": {
            	"id": "123456789",
            	"scheme": "org.icar.activities"
            "unit": "MIN",
            "aggregation": "Sum",
            "value": "1225",
        },       
    }
]
}'

Response

A successful response is 201 Created. See API Errors and HTTP Status Code Details for other possible responses and errors.