Class LogsApi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to listLogsGet.static classManage optional parameters to listLogs.static classManage optional parameters to submitLog. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAggregate events.Aggregate events.The API endpoint to aggregate events into buckets and compute metrics and timeseries.Aggregate events.Get the API client.listLogs()Search logs (POST).listLogs(LogsApi.ListLogsOptionalParameters parameters) Search logs (POST).Search logs (POST).listLogsAsync(LogsApi.ListLogsOptionalParameters parameters) Search logs (POST).Search logs (GET).listLogsGet(LogsApi.ListLogsGetOptionalParameters parameters) Search logs (GET).Search logs (GET).Search logs (GET).List endpoint returns logs that match a log search query.Search logs (GET).Search logs (GET).Search logs (GET).List endpoint returns logs that match a log search query.Search logs (POST).Search logs (POST).Search logs (POST).voidsetApiClient(ApiClient apiClient) Set the API client.submitLog(List<HTTPLogItem> body) Send logs.submitLog(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Send logs.submitLogAsync(List<HTTPLogItem> body) Send logs.submitLogAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Send logs.submitLogWithHttpInfo(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Send your logs to your Datadog platform over HTTP.submitLogWithHttpInfoAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Send logs.
-
Constructor Details
-
LogsApi
public LogsApi() -
LogsApi
-
-
Method Details
-
getApiClient
Get the API client.- Returns:
- API client
-
setApiClient
Set the API client.- Parameters:
apiClient- an instance of API client
-
aggregateLogs
Aggregate events.See
aggregateLogsWithHttpInfo(com.datadog.api.client.v2.model.LogsAggregateRequest).- Parameters:
body- (required)- Returns:
- LogsAggregateResponse
- Throws:
ApiException- if fails to make API call
-
aggregateLogsAsync
Aggregate events.See
aggregateLogsWithHttpInfoAsync(com.datadog.api.client.v2.model.LogsAggregateRequest).- Parameters:
body- (required)- Returns:
- CompletableFuture<LogsAggregateResponse>
-
aggregateLogsWithHttpInfo
public ApiResponse<LogsAggregateResponse> aggregateLogsWithHttpInfo(LogsAggregateRequest body) throws ApiException The API endpoint to aggregate events into buckets and compute metrics and timeseries.- Parameters:
body- (required)- Returns:
- ApiResponse<LogsAggregateResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Not Authorized - 429 Too many requests -
-
aggregateLogsWithHttpInfoAsync
public CompletableFuture<ApiResponse<LogsAggregateResponse>> aggregateLogsWithHttpInfoAsync(LogsAggregateRequest body) Aggregate events.See
aggregateLogsWithHttpInfo(com.datadog.api.client.v2.model.LogsAggregateRequest).- Parameters:
body- (required)- Returns:
- CompletableFuture<ApiResponse<LogsAggregateResponse>>
-
listLogs
Search logs (POST).See
listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Returns:
- LogsListResponse
- Throws:
ApiException- if fails to make API call
-
listLogsAsync
Search logs (POST).See
listLogsWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Returns:
- CompletableFuture<LogsListResponse>
-
listLogs
Search logs (POST).See
listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- LogsListResponse
- Throws:
ApiException- if fails to make API call
-
listLogsAsync
public CompletableFuture<LogsListResponse> listLogsAsync(LogsApi.ListLogsOptionalParameters parameters) Search logs (POST).See
listLogsWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<LogsListResponse>
-
listLogsWithPagination
Search logs (POST).See
listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Returns:
- PaginationIterable<Log>
-
listLogsWithPagination
public PaginationIterable<Log> listLogsWithPagination(LogsApi.ListLogsOptionalParameters parameters) Search logs (POST).See
listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Returns:
- LogsListResponse
-
listLogsWithHttpInfo
public ApiResponse<LogsListResponse> listLogsWithHttpInfo(LogsApi.ListLogsOptionalParameters parameters) throws ApiException List endpoint returns logs that match a log search query. Results are paginated.Use this endpoint to search and filter your 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:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<LogsListResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Not Authorized - 429 Too many requests -
-
listLogsWithHttpInfoAsync
public CompletableFuture<ApiResponse<LogsListResponse>> listLogsWithHttpInfoAsync(LogsApi.ListLogsOptionalParameters parameters) Search logs (POST).See
listLogsWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<LogsListResponse>>
-
listLogsGet
Search logs (GET).See
listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Returns:
- LogsListResponse
- Throws:
ApiException- if fails to make API call
-
listLogsGetAsync
Search logs (GET).See
listLogsGetWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Returns:
- CompletableFuture<LogsListResponse>
-
listLogsGet
public LogsListResponse listLogsGet(LogsApi.ListLogsGetOptionalParameters parameters) throws ApiException Search logs (GET).See
listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- LogsListResponse
- Throws:
ApiException- if fails to make API call
-
listLogsGetAsync
public CompletableFuture<LogsListResponse> listLogsGetAsync(LogsApi.ListLogsGetOptionalParameters parameters) Search logs (GET).See
listLogsGetWithHttpInfoAsync(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<LogsListResponse>
-
listLogsGetWithPagination
Search logs (GET).See
listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Returns:
- PaginationIterable<Log>
-
listLogsGetWithPagination
public PaginationIterable<Log> listLogsGetWithPagination(LogsApi.ListLogsGetOptionalParameters parameters) Search logs (GET).See
listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Returns:
- LogsListResponse
-
listLogsGetWithHttpInfo
public ApiResponse<LogsListResponse> listLogsGetWithHttpInfo(LogsApi.ListLogsGetOptionalParameters parameters) throws ApiException List endpoint returns logs that match a log search query. Results are paginated.Use this endpoint to search and filter your 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:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<LogsListResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Not Authorized - 429 Too many requests -
-
listLogsGetWithHttpInfoAsync
public CompletableFuture<ApiResponse<LogsListResponse>> listLogsGetWithHttpInfoAsync(LogsApi.ListLogsGetOptionalParameters parameters) Search logs (GET).See
listLogsGetWithHttpInfo(com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<LogsListResponse>>
-
submitLog
- Parameters:
body- Log to send (JSON format). (required)- Returns:
- Object
- Throws:
ApiException- if fails to make API call
-
submitLogAsync
- Parameters:
body- Log to send (JSON format). (required)- Returns:
- CompletableFuture<Object>
-
submitLog
public Object submitLog(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) throws ApiException - Parameters:
body- Log to send (JSON format). (required)parameters- Optional parameters for the request.- Returns:
- Object
- Throws:
ApiException- if fails to make API call
-
submitLogAsync
public CompletableFuture<Object> submitLogAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) - Parameters:
body- Log to send (JSON format). (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<Object>
-
submitLogWithHttpInfo
public ApiResponse<Object> submitLogWithHttpInfo(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) throws ApiException Send your logs to your Datadog platform over HTTP. Limits per HTTP request are:- Maximum content size per payload (uncompressed): 5MB
- Maximum size for a single log: 1MB
- Maximum array size if sending multiple logs in an array: 1000 entries
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: gzipheader to the request when sending compressed logs. Log events can be submitted with a timestamp that is up to 18 hours in the past.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
- Parameters:
body- Log to send (JSON format). (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<Object>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status 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 -
-
submitLogWithHttpInfoAsync
public CompletableFuture<ApiResponse<Object>> submitLogWithHttpInfoAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) - Parameters:
body- Log to send (JSON format). (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<Object>>
-