Class PreviewDatafeedRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.ml.PreviewDatafeedRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class PreviewDatafeedRequest extends RequestBase implements JsonpSerializable
Previews a datafeed. This API returns the first "page" of search
results from a datafeed. You can preview an existing datafeed or provide
configuration details for a datafeed and anomaly detection job in the API.
The preview shows the structure of the data that will be passed to the
anomaly detection engine. IMPORTANT: When Elasticsearch security features are
enabled, the preview uses the credentials of the user that called the API.
However, when the datafeed starts it uses the roles of the last user that
created or updated the datafeed. To get a preview that accurately reflects
the behavior of the datafeed, use the appropriate credentials. You can also
use secondary authorization headers to supply the credentials.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPreviewDatafeedRequest.BuilderBuilder forPreviewDatafeedRequest.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<PreviewDatafeedRequest>_DESERIALIZERJson deserializer forPreviewDatafeedRequeststatic SimpleEndpoint<PreviewDatafeedRequest,?>_ENDPOINTEndpoint "ml.preview_datafeed". -
Method Summary
Modifier and Type Method Description static <TDocument>
Endpoint<PreviewDatafeedRequest,PreviewDatafeedResponse<TDocument>,ErrorResponse>createPreviewDatafeedEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "ml.preview_datafeed" endpoint.DatafeedConfigdatafeedConfig()The datafeed definition to preview.java.lang.StringdatafeedId()A numerical character string that uniquely identifies the datafeed.JobConfigjobConfig()The configuration details for the anomaly detection job that is associated with the datafeed.static PreviewDatafeedRequestof(java.util.function.Function<PreviewDatafeedRequest.Builder,ObjectBuilder<PreviewDatafeedRequest>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupPreviewDatafeedRequestDeserializer(ObjectDeserializer<PreviewDatafeedRequest.Builder> op)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forPreviewDatafeedRequest -
_ENDPOINT
Endpoint "ml.preview_datafeed".
-
-
Method Details
-
of
public static PreviewDatafeedRequest of(java.util.function.Function<PreviewDatafeedRequest.Builder,ObjectBuilder<PreviewDatafeedRequest>> fn) -
datafeedConfig
The datafeed definition to preview.API name:
datafeed_config -
datafeedId
@Nullable public final java.lang.String datafeedId()A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job configuration details in the request body.API name:
datafeed_id -
jobConfig
The configuration details for the anomaly detection job that is associated with the datafeed. If thedatafeed_configobject does not include ajob_idthat references an existing anomaly detection job, you must supply thisjob_configobject. If you include both ajob_idand ajob_config, the latter information is used. You cannot specify ajob_configobject unless you also supply adatafeed_configobject.API name:
job_config -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPreviewDatafeedRequestDeserializer
protected static void setupPreviewDatafeedRequestDeserializer(ObjectDeserializer<PreviewDatafeedRequest.Builder> op) -
createPreviewDatafeedEndpoint
public static <TDocument> Endpoint<PreviewDatafeedRequest,PreviewDatafeedResponse<TDocument>,ErrorResponse> createPreviewDatafeedEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "ml.preview_datafeed" endpoint.
-