@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.ListLogsGetOptionalParameters
Manage optional parameters to listLogsGet.
|
static class |
LogsApi.ListLogsOptionalParameters
Manage optional parameters to listLogs.
|
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 LogsAggregateResponse aggregateLogs(LogsAggregateRequest body) throws ApiException
See aggregateLogsWithHttpInfo(com.datadog.api.client.v2.model.LogsAggregateRequest)
.
body
- (required)ApiException
- if fails to make API callpublic CompletableFuture<LogsAggregateResponse> aggregateLogsAsync(LogsAggregateRequest body)
See aggregateLogsWithHttpInfoAsync(com.datadog.api.client.v2.model.LogsAggregateRequest)
.
body
- (required)public ApiResponse<LogsAggregateResponse> aggregateLogsWithHttpInfo(LogsAggregateRequest body) throws ApiException
body
- (required)ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Bad Request | - |
403 | Not Authorized | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<LogsAggregateResponse>> aggregateLogsWithHttpInfoAsync(LogsAggregateRequest body)
See aggregateLogsWithHttpInfo(com.datadog.api.client.v2.model.LogsAggregateRequest)
.
body
- (required)public LogsListResponse listLogs() throws ApiException
See listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
ApiException
- if fails to make API callpublic CompletableFuture<LogsListResponse> listLogsAsync()
See listLogsWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
public LogsListResponse listLogs(LogsApi.ListLogsOptionalParameters parameters) throws ApiException
See listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callpublic CompletableFuture<LogsListResponse> listLogsAsync(LogsApi.ListLogsOptionalParameters parameters)
See listLogsWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
parameters
- Optional parameters for the request.public PaginationIterable<Log> listLogsWithPagination()
See listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
public PaginationIterable<Log> listLogsWithPagination(LogsApi.ListLogsOptionalParameters parameters)
See listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
public ApiResponse<LogsListResponse> listLogsWithHttpInfo(LogsApi.ListLogsOptionalParameters parameters) throws ApiException
Use this endpoint to build complex logs filtering and search.
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.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Bad Request | - |
403 | Not Authorized | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<LogsListResponse>> listLogsWithHttpInfoAsync(LogsApi.ListLogsOptionalParameters parameters)
See listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters)
.
parameters
- Optional parameters for the request.public LogsListResponse listLogsGet() throws ApiException
See listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
ApiException
- if fails to make API callpublic CompletableFuture<LogsListResponse> listLogsGetAsync()
See listLogsGetWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
public LogsListResponse listLogsGet(LogsApi.ListLogsGetOptionalParameters parameters) throws ApiException
See listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callpublic CompletableFuture<LogsListResponse> listLogsGetAsync(LogsApi.ListLogsGetOptionalParameters parameters)
See listLogsGetWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
parameters
- Optional parameters for the request.public PaginationIterable<Log> listLogsGetWithPagination()
See listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
public PaginationIterable<Log> listLogsGetWithPagination(LogsApi.ListLogsGetOptionalParameters parameters)
See listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
public ApiResponse<LogsListResponse> listLogsGetWithHttpInfo(LogsApi.ListLogsGetOptionalParameters parameters) throws ApiException
Use this endpoint to see your latest logs.
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.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Bad Request | - |
403 | Not Authorized | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<LogsListResponse>> listLogsGetWithHttpInfoAsync(LogsApi.ListLogsGetOptionalParameters parameters)
See listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters)
.
parameters
- Optional parameters for the request.public Object submitLog(List<HTTPLogItem> body) throws ApiException
body
- Log to send (JSON format). (required)ApiException
- if fails to make API callpublic CompletableFuture<Object> submitLogAsync(List<HTTPLogItem> body)
body
- Log to send (JSON format). (required)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 callpublic CompletableFuture<Object> submitLogAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters)
body
- Log to send (JSON format). (required)parameters
- Optional parameters for the request.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: - 202: Accepted: the request has been accepted for processing - 400: Bad request (likely an issue in the payload formatting) - 401: Unauthorized (likely a missing API Key) - 403: Permission issue (likely using an invalid API Key) - 408: Request Timeout, request should be retried after some time - 413: Payload too large (batch is above 5MB uncompressed) - 429: Too Many Requests, request should be retried after some time - 500: Internal Server Error, the server encountered an unexpected condition that prevented it from fulfilling the request, request should be retried after some time - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, 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 |
202 | Request accepted for processing (always 202 empty JSON). | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
408 | Request Timeout | - |
413 | Payload Too Large | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
503 | Service Unavailable | - |
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.