SweetConnect LogoSweetConnect
ApiDatabus metrics

Get Mean Time Between Failures (MTBF) trend

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
  • producer-admin
  • producer-user
  • sales-agent
GET
/v1/metrics/mtbf
AuthorizationBearer <token>

In: header

Query Parameters

buckets?number

Number of intervals to divide the time range into

assetId?string

Optional asset identifier to filter the calculation

startDate?unknown

Start timestamp (e.g., '-24h')

endDate?unknown

End timestamp (e.g., 'now')

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://my.sweetconnect.io/api/databus/v1/metrics/mtbf"
{
  "buckets": [
    {
      "startDate": 0,
      "endDate": 0,
      "data": [
        {
          "assetId": "string",
          "value": {},
          "statistics": {
            "data": {
              "min": 12.4,
              "max": 98.7,
              "mean": 54.2,
              "median": 52.9,
              "p90": 91.3
            },
            "metadata": {
              "minMachineId": "machine-001",
              "maxMachineId": "machine-042"
            }
          },
          "metadata": {}
        }
      ]
    }
  ],
  "warnings": [
    {
      "errorCode": "HttpError",
      "message": "Input is not valid",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "RequestValidationError",
      "message": "The 'username' field is required.",
      "extension": {
        "type": "body",
        "key": "username"
      }
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "Unauthorized",
      "message": "Authentication is required to access this resource.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "NoPermission",
      "message": "You do not have permission to access this resource.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "InternalServerError",
      "message": "An unexpected error occurred. See logs for further details or create a support ticket.",
      "extension": {}
    }
  ]
}