@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LogsApi extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LogsApi.SubmitLogOptionalParameters
Manage optional parameters to submitLog.
|
public LogsApi()
public LogsApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient
- an instance of API clientpublic LogsListResponse listLogs(LogsListRequest body) throws ApiException
See listLogsWithHttpInfo(com.datadog.api.client.v1.model.LogsListRequest)
.
body
- Logs filter (required)ApiException
- if fails to make API callpublic CompletableFuture<LogsListResponse> listLogsAsync(LogsListRequest body)
body
- Logs filter (required)public ApiResponse<LogsListResponse> listLogsWithHttpInfo(LogsListRequest body) throws ApiException
If you are considering archiving logs for your organization, consider use of the Datadog archive capabilities instead of the log list API. See Datadog Logs Archive documentation.
body
- Logs filter (required)ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Bad Request | - |
403 | Authentication error | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<LogsListResponse>> listLogsWithHttpInfoAsync(LogsListRequest body)
See listLogsWithHttpInfo(com.datadog.api.client.v1.model.LogsListRequest)
.
body
- Logs filter (required)@Deprecated public Object submitLog(List<HTTPLogItem> body) throws ApiException
body
- Log to send (JSON format). (required)ApiException
- if fails to make API call@Deprecated public CompletableFuture<Object> submitLogAsync(List<HTTPLogItem> body)
body
- Log to send (JSON format). (required)@Deprecated public Object submitLog(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) throws ApiException
body
- Log to send (JSON format). (required)parameters
- Optional parameters for the request.ApiException
- if fails to make API call@Deprecated public CompletableFuture<Object> submitLogAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters)
body
- Log to send (JSON format). (required)parameters
- Optional parameters for the request.@Deprecated public ApiResponse<Object> submitLogWithHttpInfo(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) throws ApiException
Any log exceeding 1MB is accepted and truncated by Datadog: - For a single log request, the API truncates the log at 1MB and returns a 2xx. - For a multi-logs request, the API processes all logs, truncates only logs larger than 1MB, and returns a 2xx.
Datadog recommends sending your logs compressed. Add the Content-Encoding: gzip
header to the request when sending compressed logs.
The status codes answered by the HTTP API are: - 200: OK - 400: Bad request (likely an issue in the payload formatting) - 403: Permission issue (likely using an invalid API Key) - 413: Payload too large (batch is above 5MB uncompressed) - 5xx: Internal error, request should be retried after some time
body
- Log to send (JSON format). (required)parameters
- Optional parameters for the request.ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | Response from server (always 200 empty JSON). | - |
400 | unexpected error | - |
429 | Too many requests | - |
@Deprecated public CompletableFuture<ApiResponse<Object>> submitLogWithHttpInfoAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters)
body
- Log to send (JSON format). (required)parameters
- Optional parameters for the request.Copyright © 2023. All rights reserved.