Settings
Get Webhook status
Settings
Get Webhook status
Gets the status of communication with your app's webhook.
GET
/settings/webhook
x-api-key*
curl --request GET \
--url https://api.metriport.com/settings/webhook \
--header 'x-api-key: <x-api-key>'
Response
Might return an empty body if there’s no settings yet stored for your account.
webhookEnabledrequired
string
Indicates whether the webhook is currently enabled, and working properly.
webhookStatusDetail
string
The message indicating the reason for the webhook being disabled, or ‘OK’ if the webhook is enabled. This gets updated with the message of the last failed request to the webhook.
webhookRequestsProcessingrequired
number
The number of webhook requests being currently being processed. It gets updated as the requests are processed.
webhookRequestsFailedrequired
number
The number of failed webhook requests for your acccount. It gets updated as the retries are attempted.
import { MetriportDevicesApi } from "@metriport/api";
const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");
const response = await metriportClient.getWebhookStatus();
Example response:
{
"webhookEnabled": false,
"webhookStatusDetail": "Request failed with status code 404",
"webhookRequestsProcessing": 0,
"webhookRequestsFailed": 3
}
curl --request GET \
--url https://api.metriport.com/settings/webhook \
--header 'x-api-key: <x-api-key>'
import { MetriportDevicesApi } from "@metriport/api";
const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");
const response = await metriportClient.getWebhookStatus();