diff --git a/java-client-serverless/docs/getting-started.mdx b/java-client-serverless/docs/getting-started.mdx new file mode 100644 index 000000000..9a7cb735b --- /dev/null +++ b/java-client-serverless/docs/getting-started.mdx @@ -0,0 +1,93 @@ +--- +id: gettingStartedServerlessJava +slug: /serverless-java/docs/getting-started +title: Getting started with the Serverless Java client +description: This page contains quickstart information about the Serverless Java client. +date: 2023-06-27 +tags: ['serverless','Java client','docs', 'getting started', 'Java'] +--- + +This page guides you through the installation process of the Serverless Java +client, shows you how to instantiate the client, and how to perform basic +Elasticsearch operations with it. + +## Requirements + +[TO DO] + +## Installation + +### Using the command line + +You can install the Elasticsearch Serverless Java client with the following +commands: + +```bash +``` + + +## Instantiate a client + +You can instantiate a client by running the following command: + +```java + +``` + +You can find the Elasticsearch endpoint on the Cloud deployment management page. + + + +You can create a new API Key under **Stack Management** > **Security**: + + + + +## Using the API + +After you instantiated a client with your API key and Elasticsearch endpoint, +you can start ingesting documents into the Elasticsearch Service. You can use +the Bulk API for this. This API enables you to index, update, and delete several +documents in one request. + + +### Creating an index and ingesting documents + +You can call the `bulk` API with a body parameter, an array of hashes that +define the action, and a document. + +The following is an example of indexing some classic books into the `books` +index: + +```java + +``` + +When you use the client to make a request to Elasticsearch, it returns an API +response object. You can check the HTTP return code by calling `status` and the +HTTP headers by calling `headers` on the response object. The response object +also behaves as a Hash, so you can access the body values directly as seen on +the previous example with ``. + + +### Searching + +Now that some data is available, you can search your documents using the +**Search API**: + +```java +``` + +### Updating + +You can update your documents using the Bulk API: + +```java +``` + +### Delete + +You can also delete documents: + +```java +``` \ No newline at end of file diff --git a/java-client-serverless/docs/images/copy-endpoint.gif b/java-client-serverless/docs/images/copy-endpoint.gif new file mode 100644 index 000000000..af2883dfd Binary files /dev/null and b/java-client-serverless/docs/images/copy-endpoint.gif differ diff --git a/java-client-serverless/docs/images/setup-api-key.gif b/java-client-serverless/docs/images/setup-api-key.gif new file mode 100644 index 000000000..f638ef6bb Binary files /dev/null and b/java-client-serverless/docs/images/setup-api-key.gif differ diff --git a/java-client-serverless/index.mdx b/java-client-serverless/index.mdx deleted file mode 100644 index e69de29bb..000000000