query
+ Integer from
+ Integer size,
+ Lang lang) throws NotConnectedException, InternalException
+```
+
+
+| Property | Type | Description |
+| --- | --- | --- |
+| `query` | Map
| Search query |
+| `from` | Integer
(`0`) | (optional) Offset of the first document to fetch |
+| `size` | Integer
| (optional) Maximum number of documents to retrieve per page |
+| `lang` | [Lang](/sdk/jvm/1/core-classes/lang)
| Specify the query language to use. By default, it's `elasticsearch` but `koncorde` can also be used. |
+
+### query
+
+The search query to apply to API keys content, using the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/query-dsl.html) syntax.
+
+If left empty, the result will return all available API keys for the currently logged user.
+
+## Return
+
+Returns a [SearchResult](/sdk/jvm/1/core-classes/search-result) object.
+
+
+## Usage
+
+With the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl.html) syntax.
+
+<<< ./snippets/search-api-keys-es-java.java
+
+With the [Koncorde Filters DSL](/core/2/api/koncorde-filters-syntax) syntax.
+
+
+<<< ./snippets/search-api-keys-koncorde-java.java
+
+:::
+::: tab Kotlin
+
+## Arguments
+
+```kotlin
+fun searchApiKeys(
+ query: Map,
+ from: Int = 0,
+ size: Int? = null,
+ lang: Lang = Lang.ELASTICSEARCH): CompletableFuture
+```
+
+
+| Property | Type | Description |
+| --- | --- | --- |
+| `query` | Map
| Search query |
+| `from` | Int
(`0`) | (optional) Offset of the first document to fetch |
+| `size` | Int
| (optional) Maximum number of documents to retrieve per page |
+| `lang` | [Lang](/sdk/jvm/1/core-classes/lang)
| Specify the query language to use. By default, it's `elasticsearch` but `koncorde` can also be used. |
+
+### query
+
+The search query to apply to API keys content, using the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/query-dsl.html) syntax.
+
+If left empty, the result will return all available API keys of the currently logged user.
+
+## Return
+
+Returns a [SearchResult](/sdk/jvm/1/core-classes/search-result) object.
+
+
+## Usage
+
+With the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl.html) syntax.
+
+<<< ./snippets/search-api-keys-es-kotlin.kt
+
+With the [Koncorde Filters DSL](/core/2/api/koncorde-filters-syntax) syntax.
+
+
+<<< ./snippets/search-api-keys-koncorde-kotlin.kt
+
+:::
+::::
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-java.java b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-java.java
new file mode 100644
index 00000000..09cd5ac2
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-java.java
@@ -0,0 +1,69 @@
+
+Map description = new HashMap<>();
+description.put("description", "LoRa permanent API Key");
+
+Map query = new HashMap<>();
+query.put("controller", "security");
+query.put("action", "createApiKey");
+query.put("userId", "jared.doe");
+query.put("refresh", "wait_for");
+query.put("body", description);
+
+kuzzle.query(query).get();
+
+description.put("description", "Sigfox API key");
+query.put("body", description);
+kuzzle.query(query).get();
+
+description.put("description", "LoRa 6 month API key");
+query.put("body", description);
+query.put("expiresIn", 36000);
+kuzzle.query(query).get();
+
+Map credentials = new HashMap<>();
+credentials.put("username", "jared.doe");
+credentials.put("password", "password");
+
+kuzzle.getAuthController().login("local", credentials).get();
+
+Map match = new HashMap<>();
+match.put("description", "LoRa");
+
+Map squery = new HashMap<>();
+squery.put("match", match);
+
+SearchResult results = kuzzle
+ .getAuthController()
+ .searchApiKeys(squery).get();
+
+String output = String.format("Found %d API keys matching 'LoRa'", results.total);
+
+System.out.println(output);
+
+/*
+{
+ "total"=2,
+ "hits"=[
+ {
+ "_id"="znEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa permanent API key",
+ "userId"="jared.doe",
+ "expiresAt"=-1,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=-1
+ }
+ },
+ {
+ "_id"="zXEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa 6 month API key",
+ "userId"="jared.doe",
+ "expiresAt"=31557600000,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=360000
+ }
+ }
+ ]
+}
+*/
\ No newline at end of file
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-java.test.yml b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-java.test.yml
new file mode 100644
index 00000000..89ef873c
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-java.test.yml
@@ -0,0 +1,20 @@
+name: java-auth#searchApiKeys-es
+description: Searches API keys for the currently logged user.
+hooks:
+ before: >
+ curl --fail -H "Content-type: application/json" -d '{
+ "content": {
+ "profileIds": ["default"]
+ },
+ "credentials": {
+ "local": {
+ "username": "jared.doe",
+ "password": "password"
+ }
+ }
+ }' "kuzzle:7512/users/jared.doe/_create?refresh=wait_for"
+ after:
+ curl -XDELETE kuzzle:7512/users/jared.doe
+template: default
+expected:
+ - Found 2 API keys matching 'LoRa'
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-kotlin.kt b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-kotlin.kt
new file mode 100644
index 00000000..6d1b2106
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-kotlin.kt
@@ -0,0 +1,72 @@
+
+val description: HashMap = HashMap().apply {
+ put("description", "LoRa permanent API Key")
+}
+
+val query: HashMap = HashMap().apply {
+ put("controller", "security")
+ put("action", "createApiKey")
+ put("userId", "jared.doe")
+ put("refresh", "wait_for")
+ put("body", description)
+}
+
+kuzzle.query(query).get()
+
+description.put("description", "Sigfox API key")
+query.put("body", description);
+kuzzle.query(query).get()
+
+description.put("description", "LoRa 6 month API key")
+query.put("body", description);
+query.put("expiresIn", 36000);
+kuzzle.query(query).get()
+
+kuzzle.authController.login("local", HashMap().apply {
+ put("username", "jared.doe")
+ put("password", "password")
+ }).get()
+
+val match: HashMap =
+ HashMap().apply {
+ put("description", "LoRa")
+ }
+
+val squery: HashMap =
+ HashMap().apply {
+ put("match", match)
+ }
+
+val results = kuzzle
+ .authController
+ .searchApiKeys(squery).get();
+
+print("Found ${results.total} API keys matching 'LoRa'");
+
+/*
+{
+ "total"=2,
+ "hits"=[
+ {
+ "_id"="znEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa permanent API key",
+ "userId"="jared.doe",
+ "expiresAt"=-1,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=-1
+ }
+ },
+ {
+ "_id"="zXEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa 6 month API key",
+ "userId"="jared.doe",
+ "expiresAt"=31557600000,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=360000
+ }
+ }
+ ]
+}
+*/
\ No newline at end of file
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-kotlin.test.yml b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-kotlin.test.yml
new file mode 100644
index 00000000..ceb857f1
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-es-kotlin.test.yml
@@ -0,0 +1,20 @@
+name: kotlin-auth#searchApiKeys-es
+description: Searches API keys for the currently logged user.
+hooks:
+ before: >
+ curl --fail -H "Content-type: application/json" -d '{
+ "content": {
+ "profileIds": ["default"]
+ },
+ "credentials": {
+ "local": {
+ "username": "jared.doe",
+ "password": "password"
+ }
+ }
+ }' "kuzzle:7512/users/jared.doe/_create?refresh=wait_for"
+ after:
+ curl -XDELETE kuzzle:7512/users/jared.doe
+template: default
+expected:
+ - Found 2 API keys matching 'LoRa'
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-java.java b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-java.java
new file mode 100644
index 00000000..def28c28
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-java.java
@@ -0,0 +1,59 @@
+
+Map description = new HashMap<>();
+description.put("description", "LoRa permanent API Key");
+
+Map query = new HashMap<>();
+query.put("controller", "security");
+query.put("action", "createApiKey");
+query.put("userId", "jared.doe");
+query.put("refresh", "wait_for");
+query.put("body", description);
+
+kuzzle.query(query).get();
+
+description.put("description", "Sigfox API key");
+query.put("body", description);
+kuzzle.query(query).get();
+
+description.put("description", "LoRa 6 month API key");
+query.put("body", description);
+query.put("expiresIn", 36000);
+kuzzle.query(query).get();
+
+Map credentials = new HashMap<>();
+credentials.put("username", "jared.doe");
+credentials.put("password", "password");
+
+kuzzle.getAuthController().login("local", credentials).get();
+
+Map equals = new HashMap<>();
+equals.put("ttl", "36000");
+
+Map squery = new HashMap<>();
+squery.put("equals", equals);
+
+SearchResult results = kuzzle
+ .getAuthController()
+ .searchApiKeys(squery, Lang.KONCORDE).get();
+
+String output = String.format("Found %d API key", results.total);
+
+System.out.println(output);
+
+/*
+{
+ "total"=2,
+ "hits"=[
+ {
+ "_id"="zXEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa 6 month API key",
+ "userId"="jared.doe",
+ "expiresAt"=31557600000,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=360000
+ }
+ }
+ ]
+}
+*/
\ No newline at end of file
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-java.test.yml b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-java.test.yml
new file mode 100644
index 00000000..82be47f3
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-java.test.yml
@@ -0,0 +1,20 @@
+name: java-auth#searchApiKeys-koncorde
+description: Searches API keys for the currently logged user.
+hooks:
+ before: >
+ curl --fail -H "Content-type: application/json" -d '{
+ "content": {
+ "profileIds": ["default"]
+ },
+ "credentials": {
+ "local": {
+ "username": "jared.doe",
+ "password": "password"
+ }
+ }
+ }' "kuzzle:7512/users/jared.doe/_create?refresh=wait_for"
+ after:
+ curl -XDELETE kuzzle:7512/users/jared.doe
+template: default
+expected:
+ - Found 1 API key
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-kotlin.kt b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-kotlin.kt
new file mode 100644
index 00000000..5f5814b9
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-kotlin.kt
@@ -0,0 +1,72 @@
+
+val description: HashMap = HashMap().apply {
+ put("description", "LoRa permanent API Key")
+}
+
+val query: HashMap = HashMap().apply {
+ put("controller", "security")
+ put("action", "createApiKey")
+ put("userId", "jared.doe")
+ put("refresh", "wait_for")
+ put("body", description)
+}
+
+kuzzle.query(query).get()
+
+description.put("description", "Sigfox API key")
+query.put("body", description);
+kuzzle.query(query).get()
+
+description.put("description", "LoRa 6 month API key")
+query.put("body", description);
+query.put("expiresIn", 36000);
+kuzzle.query(query).get()
+
+kuzzle.authController.login("local", HashMap().apply {
+ put("username", "jared.doe")
+ put("password", "password")
+ }).get()
+
+val equals: HashMap =
+ HashMap().apply {
+ put("ttl", "36000")
+ }
+
+val squery: HashMap =
+ HashMap().apply {
+ put("equals", equals)
+ }
+
+val results = kuzzle
+ .authController
+ .searchApiKeys(squery, lang = Lang.KONCORDE).get();
+
+print("Found ${results.total} API key");
+
+/*
+{
+ "total"=2,
+ "hits"=[
+ {
+ "_id"="znEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa permanent API key",
+ "userId"="jared.doe",
+ "expiresAt"=-1,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=-1
+ }
+ },
+ {
+ "_id"="zXEwbG8BJASM_0-bWU-q",
+ "_source"={
+ "description"="LoRa 6 month API key",
+ "userId"="jared.doe",
+ "expiresAt"=31557600000,
+ "fingerprint": "4ee98cb8c614e99213e7695f822e42325d86c93cfaf39cb40e860939e784c8e6",
+ "ttl"=360000
+ }
+ }
+ ]
+}
+*/
diff --git a/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-kotlin.test.yml b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-kotlin.test.yml
new file mode 100644
index 00000000..f43a1584
--- /dev/null
+++ b/doc/1/controllers/auth/search-api-keys/snippets/search-api-keys-koncorde-kotlin.test.yml
@@ -0,0 +1,20 @@
+name: kotlin-auth#searchApiKeys-koncorde
+description: Searches API keys for the currently logged user.
+hooks:
+ before: >
+ curl --fail -H "Content-type: application/json" -d '{
+ "content": {
+ "profileIds": ["default"]
+ },
+ "credentials": {
+ "local": {
+ "username": "jared.doe",
+ "password": "password"
+ }
+ }
+ }' "kuzzle:7512/users/jared.doe/_create?refresh=wait_for"
+ after:
+ curl -XDELETE kuzzle:7512/users/jared.doe
+template: default
+expected:
+ - Found 1 API key
diff --git a/doc/1/controllers/bulk/import-data/snippets/import-data-kotlin.kt b/doc/1/controllers/bulk/import-data/snippets/import-data-kotlin.kt
index 536cb97d..ea671d9b 100644
--- a/doc/1/controllers/bulk/import-data/snippets/import-data-kotlin.kt
+++ b/doc/1/controllers/bulk/import-data/snippets/import-data-kotlin.kt
@@ -39,4 +39,4 @@ val result: Map =
"yellow-taxi",
bulkData
)
- .get()
\ No newline at end of file
+ .get()
diff --git a/doc/1/controllers/bulk/m-write/snippets/mwrite-kotlin.kt b/doc/1/controllers/bulk/m-write/snippets/mwrite-kotlin.kt
index 430a3663..1fa4a0fd 100644
--- a/doc/1/controllers/bulk/m-write/snippets/mwrite-kotlin.kt
+++ b/doc/1/controllers/bulk/m-write/snippets/mwrite-kotlin.kt
@@ -6,4 +6,4 @@ val documents: ArrayList