Class LogsApi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to submitLog. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the API client.listLogs(LogsListRequest body) Search logs.listLogsAsync(LogsListRequest body) Search logs.List endpoint returns logs that match a log search query.Search logs.voidsetApiClient(ApiClient apiClient) Set the API client.submitLog(List<HTTPLogItem> body) Deprecated.submitLog(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Deprecated.submitLogAsync(List<HTTPLogItem> body) Deprecated.submitLogAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Deprecated.submitLogWithHttpInfo(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Deprecated.submitLogWithHttpInfoAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Deprecated.
-
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
-
listLogs
Search logs.See
listLogsWithHttpInfo(com.datadog.api.client.v1.model.LogsListRequest).- Parameters:
body- Logs filter (required)- Returns:
- LogsListResponse
- Throws:
ApiException- if fails to make API call
-
listLogsAsync
- Parameters:
body- Logs filter (required)- Returns:
- CompletableFuture<LogsListResponse>
-
listLogsWithHttpInfo
List endpoint returns logs that match a log search query. Results are paginated.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.
Note: This endpoint is enabled by default for logs customers. To disable it, contact Datadog support.
- Parameters:
body- Logs filter (required)- 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 Authentication error - 429 Too many requests -
-
listLogsWithHttpInfoAsync
public CompletableFuture<ApiResponse<LogsListResponse>> listLogsWithHttpInfoAsync(LogsListRequest body) Search logs.See
listLogsWithHttpInfo(com.datadog.api.client.v1.model.LogsListRequest).- Parameters:
body- Logs filter (required)- Returns:
- CompletableFuture<ApiResponse<LogsListResponse>>
-
submitLog
Deprecated.- Parameters:
body- Log to send (JSON format). (required)- Returns:
- Object
- Throws:
ApiException- if fails to make API call
-
submitLogAsync
Deprecated.- Parameters:
body- Log to send (JSON format). (required)- Returns:
- CompletableFuture<Object>
-
submitLog
@Deprecated public Object submitLog(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) throws ApiException Deprecated.- 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
@Deprecated public CompletableFuture<Object> submitLogAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Deprecated.- Parameters:
body- Log to send (JSON format). (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<Object>
-
submitLogWithHttpInfo
@Deprecated public ApiResponse<Object> submitLogWithHttpInfo(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) throws ApiException Deprecated.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.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
- 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 200 Response from server (always 200 empty JSON). - 400 unexpected error - 429 Too many requests -
-
submitLogWithHttpInfoAsync
@Deprecated public CompletableFuture<ApiResponse<Object>> submitLogWithHttpInfoAsync(List<HTTPLogItem> body, LogsApi.SubmitLogOptionalParameters parameters) Deprecated.- Parameters:
body- Log to send (JSON format). (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<Object>>
-