All URIs are relative to https://api.datadoghq.com
| Method | HTTP request | Description |
|---|---|---|
| submitServiceCheck | POST /api/v1/check_run | Submit a Service Check |
IntakePayloadAccepted submitServiceCheck(body)
Submit a list of Service Checks.
Note: A valid API key is required.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.ServiceChecksApi(configuration);
let params: v1.ServiceChecksApiSubmitServiceCheckRequest = {
// Array<ServiceCheck> | Service Check request body.
body: [
{
check: "app.ok",
hostName: "app.host1",
message: "app is running",
status: 0,
tags: ["environment:test"],
timestamp: 1,
},
],
};
apiInstance
.submitServiceCheck(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| body | Array | Service Check request body. |
IntakePayloadAccepted
- Content-Type: application/json
- Accept: text/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Payload accepted | - |
| 400 | Bad Request | - |
| 403 | Authentication Error | - |
| 408 | Request timeout | - |
| 413 | Payload too large | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]