POST
/
v1
/
cards
/
{cardId}
/
metrics
/
bulk
Submit bulk metrics for a card
curl --request POST \
  --url https://api.vistaly.com/v1/cards/{cardId}/metrics/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metrics": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "value": 123
    }
  ]
}'
{
  "message": "Bulk metric import completed",
  "succeeded": 950,
  "failed": [
    {
      "index": 42,
      "metric": {
        "value": -1,
        "timestamp": "2024-01-01T00:00:00Z"
      },
      "error": "Metric value must be non-negative"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

cardId
string
required

The unique identifier for the card whose metrics are being submitted.

Body

application/json

Response

200
application/json

Bulk metrics import completed (may include partial failures)

The response is of type object.