Push Service Status

Validic has provided an endpoint that retrieves status-related events to provide better visibility into the Inform Push Service.

GET /organizations/{organization_id}/notifications

Returns the status of individual push notification batches during a specified timeframe. Within this request, you can use the following request parameters.

Request Parameters

Name

Required

Type

Description

Notes

organization_id

true

URI Param

The Validic Organization ID to associate the user with.

token

true

Query Param

The token provided by Validic to access Validic API’s.

start_time

false

Query Param

Start time in UTC

YYYY-MM-DDTHH:MM:SSZ

end_time

false

Query Param

End time in UTC

YYYY-MM-DDTHH:MM:SSZ

status

false

Query Param

Used to specify status of push notification batches to report on.

If not included returns records for all status types during the specified timeframe.

status=success returns all successful notifications during timeframe

status=failure returns all failed notifications during timeframe

{
    "data": [
        {
            "id": "c123456b-01f1-49de-b794-b123456e26e1",
            "status": "FAILURE",
            "attempts": {
                "first_at": "2021-01-29T16:13:45.856703129Z",
                "last_at": "2021-01-29T22:36:10.417425659Z",
                "count": 40
            }
        },
        {
            "id": "e1ab4cfd-2fa3-434d-b7a8-3cd42123e760",
            "status": "SUCCESS",
            "attempts": {
                "first_at": "2021-02-01T17:58:45.856612044Z",
                "last_at": "2021-02-01T17:59:04.672959458Z",
                "count": 1
            }
        }
    ]
}

GET /organizations/{organization_id}/notifications/{id}

Returns detailed information about a given notification. Within this request, you can use the following request parameters.

Request Parameters

Name

Required

Type

Description

organization_id

true

URI Param

The Validic Organization ID to associate the user with.

id

true

URI Param

The batch id for the push notification.

token

true

Query Param

The token provided by Validic to access Validic API’s.

{
    "id": "c123456b-01f1-49de-b794-b123456e26e1",
    "status": "FAILURE",
    "attempts": {
        "start_at": "2021-01-29T16:13:45.856703129Z",
        "last_at": "2021-01-29T22:36:10.417425659Z",
        "details": [
            {
                "transmitted_at": "2021-01-29T16:14:45.857065056Z",
                "response": {
                    "code": 0,
                    "body": "client request error: Post \"https://api-test.push.com/v1/measurements\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
                }
            },
            
            ...
            
            {
                "transmitted_at": "2021-01-29T22:36:10.417425659Z",
                "response": {
                    "code": 0,
                    "body": "client request error: Post \"https://api-test.push.com/v1/measurements\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
                }
            }
        ]
    },
    "items": [
        {
            "checksum": "5bd123fdebe56ce672ace3b672beaa6ac",
            "created_at": "2021-01-29T16:10:55.862Z",
            "deleted_at": null,
            "end_time": "2021-01-29T16:10:41Z",
            "id": "fe0907ed12dae4d6c8d2b630870ea30e8",
            "log_id": "1e5abc79ef6afba7d8778d4b2d08548b19d6db20",
            "metrics": [
                {
                    "type": "body_weight",
                    "origin": "device",
                    "unit": "kg",
                    "value": 87.1
                }
            ],
            "offset_origin": "profile",
            "source": {
                "type": "bodytrace",
                "device": {
                    "id": null,
                    "model": "bodytrace_scale",
                    "manufacturer": null,
                    "diagnostics": [
                        {
                            "type": "battery_voltage",
                            "unit": "mV",
                            "value": 5325.0
                        },
                        {
                            "type": "signal_strength",
                            "unit": "percent",
                            "value": 71.0
                        }
                    ]
                }
            },
            "start_time": "2021-01-29T16:10:41Z",
            "tags": [],
            "type": "measurement",
            "user": {
                "organization_id": "5ab77f96d8833111b0618423",
                "user_id": "1234567ab3436500016b59f3",
                "uid": "5966619"
            },
            "user_notes": [],
            "utc_offset": -18000,
            "version": "1.0"
        }
    ]
}

Did this page help you?