Sha256: 5d87aa24400049fa5d53beea3428feba099abc8deda4d18d15f7e09279e95341
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
# DatadogAPIClient::V1::ServiceChecksAPI All URIs are relative to *https://api.datadoghq.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**submit_service_check**](ServiceChecksAPI.md#submit_service_check) | **POST** /api/v1/check_run | Submit a Service Check | ## submit_service_check > <IntakePayloadAccepted> submit_service_check(body) Submit a list of Service Checks. **Note**: A valid API key is required. ### Examples ```ruby require 'datadog_api_client' api_instance = DatadogAPIClient::V1::ServiceChecksAPI.new body = [DatadogAPIClient::V1::ServiceCheck.new({check: 'app.ok', host_name: 'app.host1', status: DatadogAPIClient::V1::ServiceCheckStatus::OK, tags: ['tags_example']})] # Array<ServiceCheck> | Service Check request body. begin # Submit a Service Check result = api_instance.submit_service_check(body) p result rescue DatadogAPIClient::V1::APIError => e puts "Error when calling ServiceChecksAPI->submit_service_check: #{e}" end ``` #### Using the submit_service_check_with_http_info variant This returns an Array which contains the response data, status code and headers. > <Array(<IntakePayloadAccepted>, Integer, Hash)> submit_service_check_with_http_info(body) ```ruby begin # Submit a Service Check data, status_code, headers = api_instance.submit_service_check_with_http_info(body) p status_code # => 2xx p headers # => { ... } p data # => <IntakePayloadAccepted> rescue DatadogAPIClient::V1::APIError => e puts "Error when calling ServiceChecksAPI->submit_service_check_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **body** | [**Array<ServiceCheck>**](ServiceCheck.md) | Service Check request body. | | ### Return type [**IntakePayloadAccepted**](IntakePayloadAccepted.md) ### Authorization [apiKeyAuth](README.md#apiKeyAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.3.0 | docs/v1/ServiceChecksAPI.md |
datadog_api_client-1.2.0 | docs/v1/ServiceChecksAPI.md |