Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor controllers #1446

Merged
merged 215 commits into from Sep 18, 2019
Merged
Changes from 1 commit
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
cb89684
Add doc 2, drop node 6 & 8, update ws
Aschen Aug 8, 2019
76f4334
remove proxy from tests
Aschen Aug 8, 2019
215efbd
remove for with performance hack
Aschen Aug 8, 2019
42eeca6
revert deleting proxy test
Aschen Aug 8, 2019
ab4d09b
updates docker-compose
Aschen Aug 8, 2019
3a064d0
wip
Aschen Aug 8, 2019
3f8649d
remove doc
Aschen Aug 8, 2019
ec4ccf5
add 1 doc
Aschen Aug 8, 2019
3e44a1d
remove plugin/protocols
Aschen Aug 8, 2019
a4772b9
merge ok
Aschen Aug 9, 2019
209688a
Fix tests for manifest v2
Aschen Aug 9, 2019
c5622ff
Merge branch '2-dev' into drop-obsolete-stuff
Aschen Aug 9, 2019
f4066c8
drop proxy tests
Aschen Aug 9, 2019
45ed722
Move doc 1 -> 2
Aschen Aug 9, 2019
83da465
fix cucumber
Aschen Aug 9, 2019
3671b0d
Merge branch 'drop-obsolete-stuff' into move-documentation
Aschen Aug 9, 2019
52a34ff
Merge branch '1-dev' of github.com:kuzzleio/kuzzle into drop-obsolete…
Aschen Aug 12, 2019
0d985df
Merge branch 'drop-obsolete-stuff' into move-documentation
Aschen Aug 12, 2019
263df19
fix integration tests
Aschen Aug 12, 2019
98aa50f
Merge branch 'drop-obsolete-stuff' into move-documentation
Aschen Aug 12, 2019
391a6c8
wip
Aschen Aug 12, 2019
0da8b84
nit
Aschen Aug 12, 2019
17ed4e9
Merge branch 'drop-obsolete-stuff' into move-documentation
Aschen Aug 12, 2019
0d3b349
Merge branch '2-dev' into move-documentation
alexandrebouthinon Aug 12, 2019
978b5ec
add error codes to eswrapper
Aschen Aug 14, 2019
fc36ba6
fix(es): fix not found message
Aschen Aug 14, 2019
b62871c
fix(errors): refactor errors manager
Aschen Aug 14, 2019
5af7507
wip
Aschen Aug 14, 2019
a5e4789
Merge branch 'move-documentation' into KZL-1302/emulate-collections
Aschen Aug 14, 2019
26cf299
please sonarqube
Aschen Aug 14, 2019
b4131a4
Auto review
Aschen Aug 14, 2019
a210483
please sonarqube
Aschen Aug 15, 2019
af6c3e1
merge ok
Aschen Aug 15, 2019
84d09fd
nit
Aschen Aug 15, 2019
0757aaf
put back plugins on master branch
Aschen Aug 16, 2019
b9fd977
merge ok
Aschen Aug 16, 2019
2512795
InternalEngineBootstrap done; Add esEmulator
Aschen Aug 16, 2019
c331cd7
pluginBootstrap + internal Bootstrap
Aschen Aug 16, 2019
9f3ab87
InternalEngine + Bootstrap ok
Aschen Aug 19, 2019
a65c38f
test(internalBootstrap): add tests
Aschen Aug 19, 2019
ff40e08
test(esWrapper): fix tests
Aschen Aug 19, 2019
c69776e
fix(eslint): eslint
Aschen Aug 19, 2019
6740060
rename esEmulator to collectionEmulator
Aschen Aug 20, 2019
3eaf5a5
Extract BaseBootstrap
Aschen Aug 20, 2019
6e5f7bd
nit
Aschen Aug 20, 2019
9a4f2c6
split esWrapper error handle
Aschen Aug 20, 2019
67524d0
sonarqube
Aschen Aug 20, 2019
ee17d61
pr review
Aschen Aug 20, 2019
afce61b
nit
Aschen Aug 20, 2019
a5b8104
wip
Aschen Aug 21, 2019
6509cd2
wip
Aschen Aug 21, 2019
b0cb932
[drop] Drop support for the deprecated Kuzzle Proxy (WIP)
scottinet Aug 21, 2019
d1f7c14
wip
Aschen Aug 21, 2019
35f1417
wip
Aschen Aug 22, 2019
906cc8f
[tests] Drop support for Kuzzle Proxy
scottinet Aug 23, 2019
ea280e3
[fix] Last minute typo + sonarqube fixes
scottinet Aug 23, 2019
67fa91d
[ci] remove a proxy leftover
scottinet Aug 23, 2019
e40ed4d
[test] fix failing test
scottinet Aug 23, 2019
606a569
Merge remote-tracking branch 'origin/2-dev' into remove-deprecated-fe…
scottinet Aug 23, 2019
6773f9a
[doc] update breaking changes list
scottinet Aug 23, 2019
0aac710
update plugins
scottinet Aug 23, 2019
eea6dc1
es service + internalStorage wrapper
Aschen Aug 23, 2019
029e14b
[cleanup] remove superfluous error conversion
scottinet Aug 23, 2019
8389114
Merge remote-tracking branch 'origin/2-dev' into remove-deprecated-fe…
scottinet Aug 23, 2019
e3d571e
Merge remote-tracking branch 'origin/2-dev' into remove-deprecated-fe…
scottinet Aug 23, 2019
0bb12a1
[test] fix failing test
scottinet Aug 23, 2019
c86eae5
[cleanup] reformat & optimize
scottinet Aug 23, 2019
35a5911
unit test
Aschen Aug 26, 2019
b58c6f7
merge ok
Aschen Aug 26, 2019
4219a9b
Merge remote-tracking branch 'origin/2-dev' into remove-deprecated-fe…
scottinet Aug 26, 2019
26cc60a
[breaking] WIP: remove closures/sandbox code (+ repair unit tests)
scottinet Aug 26, 2019
d4dc9e4
fix units tests
Aschen Aug 26, 2019
6058360
please sonarqube
Aschen Aug 26, 2019
fc33909
please sonarqube
Aschen Aug 26, 2019
76c068d
please sonarqube
Aschen Aug 26, 2019
b42ca77
please sonarqube
Aschen Aug 26, 2019
54c7897
tests unitaires es wip
Aschen Aug 28, 2019
c655d14
[fix] replace the trace module with a memleak-free version
scottinet Aug 28, 2019
9491900
tests unitaires es: m* methods wip
Aschen Aug 28, 2019
1748e67
end tests for es service
Aschen Aug 28, 2019
2fb62c1
[fix] make unit tests work
scottinet Aug 28, 2019
c0fa00a
[tests] more unit tests fixes
scottinet Aug 28, 2019
9d87e23
merge ok, test fails
Aschen Aug 29, 2019
33a9c6f
[doc] remove closures from the documentation
scottinet Aug 29, 2019
1370df5
Merge remote-tracking branch 'origin/2-dev' into remove-deprecated-fe…
scottinet Aug 29, 2019
fdaa0e0
wip fix tests
Aschen Aug 29, 2019
d522588
merge ok
Aschen Aug 29, 2019
5a98bbc
[cleanup] last minute fixes
scottinet Aug 29, 2019
845e459
[sonarqube] replace shady while loop with a proper for(;;) one
scottinet Aug 29, 2019
94f5c26
tests OK LOL
Aschen Aug 29, 2019
f1edaae
Fix bootstrap to use internalStorage
Aschen Aug 29, 2019
a9c2c31
Merge remote-tracking branch 'origin/remove-deprecated-feature/closur…
Aschen Aug 29, 2019
8a49e10
nit
Aschen Aug 29, 2019
acd4576
reorganize internalIndex config
Aschen Aug 29, 2019
c4b448f
nit
Aschen Aug 29, 2019
b10d8ec
remove bootstrap from es service
Aschen Aug 29, 2019
de58f7a
[fix] fix trace bug
scottinet Aug 29, 2019
6499e76
fix mget
Aschen Aug 29, 2019
60d91a6
nit on es ervice
Aschen Aug 29, 2019
08788bd
Merge remote-tracking branch 'origin/remove-deprecated-feature/closur…
Aschen Aug 29, 2019
258cea9
merge ok
Aschen Aug 29, 2019
8a1deb4
fix travis
Aschen Aug 29, 2019
b919048
Fix travis condition
alexandrebouthinon Aug 29, 2019
4dd7030
Fix condition for integration tests
alexandrebouthinon Aug 29, 2019
174119c
remove esWrapper.getMapping
Aschen Aug 29, 2019
8fb6faa
Merge branch 'KZL-1302/adapt-elasticsearch-service' of github.com:kuz…
Aschen Aug 29, 2019
c1f0496
remove deletedAt
Aschen Aug 29, 2019
c401d0c
Refactor services: move init in base class + change kuzzle init sequence
Aschen Aug 29, 2019
3af3a49
[fix] remove needless use of lodash, remove event security:formatUser…
scottinet Aug 29, 2019
e49d8a6
[sonar] fix sonarqube issue
scottinet Aug 29, 2019
c9a1c06
Refactor plugin context + bootstrap with new services achitecture
Aschen Aug 29, 2019
c82ae48
services initialization ok
Aschen Aug 29, 2019
c9b5a55
add get/set to restrictedStorage
Aschen Aug 29, 2019
6c8cd8b
Kuzzle 2.x can start
Aschen Aug 29, 2019
9faee8f
[fix] fix bug found by sonarqube -_-
scottinet Aug 30, 2019
6234da4
Merge branch 'remove-deprecated-feature/closures' into KZL-1302/adapt…
scottinet Aug 30, 2019
145737c
rename RestrictedStorage to IndexEngine
Aschen Aug 30, 2019
df9acf7
move bootstrap to storage
Aschen Aug 30, 2019
d1d7e4c
Fix redis service init
Aschen Aug 30, 2019
1aed07c
fix some todo
Aschen Aug 30, 2019
5a5e20a
nit
Aschen Aug 30, 2019
b7658ee
Update lib/services/elasticsearch.js
Aschen Aug 30, 2019
9fb8dce
apply @scottinet comment
Aschen Aug 30, 2019
4df36b0
Merge branch 'KZL-1302/adapt-elasticsearch-service' of github.com:kuz…
Aschen Aug 30, 2019
774bb64
merge ok
Aschen Aug 30, 2019
cf634f8
nit
Aschen Aug 30, 2019
7698434
indexCache test wip
Aschen Aug 30, 2019
d00a4cd
please sonarqube
Aschen Sep 2, 2019
6ab1477
indexCache tests ok
Aschen Sep 2, 2019
9493d53
indexEngine tests ok
Aschen Sep 2, 2019
f7ecc97
internalIndexBootstrap tests wip
Aschen Sep 2, 2019
ec828f6
internalIndexBootstrap tests ok
Aschen Sep 2, 2019
86eab91
fix kuzzle startup
Aschen Sep 2, 2019
57ff18d
fix tests
Aschen Sep 3, 2019
e2deac3
fix lint
Aschen Sep 3, 2019
f0ff23e
fix services tests
Aschen Sep 3, 2019
4f66c9e
fix mocked property on kuzzle
Aschen Sep 3, 2019
0345d20
merge ok
Aschen Sep 3, 2019
aea3cf6
merge ok
Aschen Sep 3, 2019
2f033eb
please sonarqube
Aschen Sep 3, 2019
deac4a8
wrap errorsManager for janitor
Aschen Sep 3, 2019
7c66340
...
Aschen Sep 3, 2019
2dc5f29
Index controller ok
Aschen Sep 3, 2019
a6494d3
wip
Aschen Sep 3, 2019
ac18349
update migration guide
Aschen Sep 3, 2019
f436d06
clean index:refresh* related code
Aschen Sep 3, 2019
a523116
Merge branch '2-dev' into KZL-1302/refactor-controllers
Aschen Sep 3, 2019
9fd4ae1
wip adminCOntroller
Aschen Sep 4, 2019
f0ac245
indexCache: allow to not notify for cluster sync
Aschen Sep 4, 2019
3138c1c
Merge branch '2-dev' into KZL-1302/refactor-storage-engines
Aschen Sep 4, 2019
a6e3be0
Update lib/api/core/models/repositories/repository.js
Aschen Sep 4, 2019
0acb4c5
Update lib/api/core/models/repositories/repository.js
Aschen Sep 4, 2019
085a0ec
Update lib/api/core/models/repositories/repository.js
Aschen Sep 4, 2019
68c7c83
Expose redis and ES ports
Aschen Sep 4, 2019
9a4a3ad
Merge branch 'KZL-1302/refactor-storage-engines' of github.com:kuzzle…
Aschen Sep 4, 2019
4342334
Admin controller ok
Aschen Sep 4, 2019
8721743
Auth controller ok
Aschen Sep 4, 2019
38b9836
Merge remote-tracking branch 'origin/2-dev' into KZL-1302/refactor-st…
scottinet Sep 4, 2019
ef1a862
bulk controller wip
Aschen Sep 4, 2019
db68f2d
Merge branch '2-dev' into KZL-1302/refactor-controllers
Aschen Sep 4, 2019
e3b7120
fix admin, auth, bulk, index, controllers tests
Aschen Sep 5, 2019
0fc047a
collection controller wip
Aschen Sep 5, 2019
0352527
merge c8a95dd (document:mGet fix)
Aschen Sep 5, 2019
0eca5f2
Update lib/api/core/storage/indexCache.js
Aschen Sep 5, 2019
4a03ca6
Rename getInfos to infos (DATAS)
Aschen Sep 5, 2019
7d6aab3
Merge branch 'KZL-1302/refactor-storage-engines' of github.com:kuzzle…
Aschen Sep 5, 2019
1566414
merge ok
Aschen Sep 5, 2019
6bceec5
Refactor storageEngine and cacheEngine
Aschen Sep 9, 2019
d1ff8ea
Refactor storage and cache services (tests wip)
Aschen Sep 9, 2019
d5c2940
Refactor storage and cache services (tests wip)
Aschen Sep 9, 2019
5923edb
Tests core components + services ok
Aschen Sep 10, 2019
34f140b
Fix admin, auth, base, bulk, index controllers tests
Aschen Sep 10, 2019
a584782
Collection controller ok
Aschen Sep 10, 2019
c8cd256
Document controller ok
Aschen Sep 11, 2019
debd718
Security et base controller ok
Aschen Sep 11, 2019
4695547
Fix all tests
Aschen Sep 12, 2019
7e1d365
Fix functional tests wip
Aschen Sep 12, 2019
b354b8f
Fix pluginIndex init
Aschen Sep 13, 2019
cefa2f1
functionnal tests wip :beers:
Aschen Sep 13, 2019
2c46c2c
Functionnal tests ok
Aschen Sep 15, 2019
ad08a0d
fix unit tests
Aschen Sep 15, 2019
1ab43df
merge ok
Aschen Sep 15, 2019
cf36c19
merge really ok
Aschen Sep 15, 2019
8f413de
fix redis init
Aschen Sep 15, 2019
ddad75e
sonarqube
Aschen Sep 15, 2019
6f6bc35
sonarqube
Aschen Sep 15, 2019
fb1d764
eslint
Aschen Sep 15, 2019
e865f49
[fix] fix an unhandled promise rejection (#1464)
scottinet Sep 15, 2019
6cfbe75
remove trace
Aschen Sep 16, 2019
a09b027
Merge branch 'KZL-1302/refactor-controllers' of github.com:kuzzleio/k…
Aschen Sep 16, 2019
1c35403
Add refresh doc + few nit
Aschen Sep 16, 2019
2629da0
merge ok
Aschen Sep 16, 2019
3a046a6
fix dockerfile
Aschen Sep 16, 2019
b740341
nit
Aschen Sep 16, 2019
7050c46
nit
Aschen Sep 16, 2019
33b3f99
deleteByQuery does not accept wait_for
Aschen Sep 17, 2019
ee2e67c
apply @scottinet review
Aschen Sep 18, 2019
49550af
Update doc/2/api/controllers/collection/refresh/index.md
Aschen Sep 18, 2019
48b5152
Update doc/2/api/controllers/document/m-get/index.md
Aschen Sep 18, 2019
974e5b8
Update doc/2/api/controllers/document/m-get/index.md
Aschen Sep 18, 2019
0030ff5
Update doc/2/guides/migrate-from-v1/introduction/index.md
Aschen Sep 18, 2019
bfd54b7
Update doc/2/guides/migrate-from-v1/introduction/index.md
Aschen Sep 18, 2019
1549d73
Update doc/2/guides/migrate-from-v1/introduction/index.md
Aschen Sep 18, 2019
90b74e0
Update lib/api/core/storage/bootstrap/safeBootstrap.js
Aschen Sep 18, 2019
35829df
Update lib/api/core/storage/clientAdapter.js
Aschen Sep 18, 2019
2d0d471
merge ok
Aschen Sep 18, 2019
f8d6468
fix tests
Aschen Sep 18, 2019
56d4a2b
Update doc/2/guides/essentials/store-access-data/index.md
scottinet Sep 18, 2019
678102b
rename publicCache to memoryStorage
Aschen Sep 18, 2019
2743779
Update lib/api/core/storage/indexStorage.js
Aschen Sep 18, 2019
c03baa1
minimum LTS to 10.13.0
Aschen Sep 18, 2019
b070e1c
Merge branch 'KZL-1302/refactor-controllers' of github.com:kuzzleio/k…
Aschen Sep 18, 2019
dec884c
Fix sinon restore memleak
Aschen Sep 18, 2019
37a7971
fix last test
Aschen Sep 18, 2019
6a81baf
sonarqube
Aschen Sep 18, 2019
File filter...
Filter file types
Jump to…
The table of contents is too big for display.

Always

Just for now

Move doc 1 -> 2

  • Loading branch information...
Aschen committed Aug 9, 2019
commit 45ed722e90beffb1b01c4f1d333bacff81c605d1

This file was deleted.

File renamed without changes.
@@ -1,6 +1,6 @@
---
type: branch
title: admin
description: API v1.x Admin controller
description: API v2.x Admin controller
code: true
---
@@ -13,7 +13,7 @@ Load fixtures into the storage layer.
**Notes:**

* The fixtures can contain any number of index and collection configurations.
* Each collection contains an array of data to load, just like the [bulk:import API](/core/1/api/controllers/bulk/import).
* Each collection contains an array of data to load, just like the [bulk:import API](/core/2/api/controllers/bulk/import).
* If an index or collection does not exist, the load will fail.
* Fixtures are loaded sequentially, one index/collection pair at a time. If a failure occurs, Kuzzle immediately interrupts the sequence, without rollbacking the previously loaded fixtures.

@@ -12,9 +12,9 @@ Load roles, profiles and users into the storage layer.

The roles, profiles and users definitions follow the same structure as in the body parameter of these corresponding API routes:

- [createRole](/core/1/api/controllers/security/create-role)
- [createProfile](/core/1/api/controllers/security/create-profile)
- [createUser](/core/1/api/controllers/security/create-user)
- [createRole](/core/2/api/controllers/security/create-role)
- [createProfile](/core/2/api/controllers/security/create-profile)
- [createUser](/core/2/api/controllers/security/create-user)

**Notes:**

@@ -36,7 +36,7 @@ Method: POST

- `database`: there are two Redis databases that you can clear
- `internalCache` : used by Kuzzle to cache internal data, such as authentication tokens, documents followed by real-time subscriptions, active paginated search queries, API usage statistics or cluster state
- `memoryStorage` : memory cache managed by Kuzzle's [memoryStorage](/core/1/api/controllers/memory-storage) API
- `memoryStorage` : memory cache managed by Kuzzle's [memoryStorage](/core/2/api/controllers/memory-storage) API

---

@@ -44,9 +44,9 @@ Headers: Authorization: "Bearer <authentication token>"

The result contains the following properties:

- `_id`: current user's [kuid](/core/1/guides/essentials/user-authentication#kuzzle-user-identifier-kuid)
- `_id`: current user's [kuid](/core/2/guides/essentials/user-authentication#kuzzle-user-identifier-kuid)
- `_source`: user information
- `profileIds`: list of [profile](/core/1/guides/essentials/security#users-profiles-and-roles) names associated to the user
- `profileIds`: list of [profile](/core/2/guides/essentials/security#users-profiles-and-roles) names associated to the user
- any other properties: additional (and optional) user information
- `strategies`: available authentication strategies for that user

File renamed without changes.
@@ -48,32 +48,32 @@ Body:

## Arguments

- `strategy`: the name of the authentication [strategy](/core/1/guides/kuzzle-depth/authentication#authentication) used to log the user in.
- `strategy`: the name of the authentication [strategy](/core/2/guides/kuzzle-depth/authentication#authentication) used to log the user in.

### Optional:

- `expiresIn`: set the expiration duration (default: depends on [Kuzzle configuration file](/core/1/guides/essentials/configuration))
- `expiresIn`: set the expiration duration (default: depends on [Kuzzle configuration file](/core/2/guides/essentials/configuration))
- if a raw number is provided (not enclosed between quotes), then the expiration delay is in milliseconds. Example: `86400000`
- if this value is a string, then its content is parsed by the [ms](https://www.npmjs.com/package/ms) library. Examples: `"6d"`, `"10h"`

---

## Body properties

Depending on the chosen authentication strategy, additional [credential arguments](/core/1/guides/kuzzle-depth/authentication#authentication) may be required.
Depending on the chosen authentication strategy, additional [credential arguments](/core/2/guides/kuzzle-depth/authentication#authentication) may be required.

The API request example in this page provides the necessary arguments for the [`local` authentication plugin](https://github.com/kuzzleio/kuzzle-plugin-auth-passport-local).

Check the appropriate [authentication plugin](/core/1/plugins/guides/strategies) documentation to get the list of additional arguments to provide.
Check the appropriate [authentication plugin](/core/2/plugins/guides/strategies) documentation to get the list of additional arguments to provide.

---

## Response

The result contains the following properties:

- `_id`: user's [kuid](/core/1/guides/kuzzle-depth/authentication#the-kuzzle-user-identifier)
- `jwt`: encrypted JSON Web Token, that must then be sent in the [requests headers](/core/1/api/essentials/query-syntax#http) or in the [query](/core/1/api/essentials/query-syntax#other-protocols)
- `_id`: user's [kuid](/core/2/guides/kuzzle-depth/authentication#the-kuzzle-user-identifier)
- `jwt`: encrypted JSON Web Token, that must then be sent in the [requests headers](/core/2/api/essentials/query-syntax#http) or in the [query](/core/2/api/essentials/query-syntax#other-protocols)
- `expiresAt`: token expiration date, in Epoch-millis (UTC)
- `ttl`: token time to live, in milliseconds

File renamed without changes.
@@ -41,7 +41,7 @@ Method: POST

### Optional:

* `expiresIn`: set the expiration duration (default: depends on [Kuzzle configuration file](/core/1/guides/essentials/configuration))
* `expiresIn`: set the expiration duration (default: depends on [Kuzzle configuration file](/core/2/guides/essentials/configuration))
* if a raw number is provided (not enclosed between quotes), then the expiration delay is in milliseconds. Example: `86400000`
* if this value is a string, then its content is parsed by the [ms](https://www.npmjs.com/package/ms) library. Examples: `"6d"`, `"10h"`

@@ -51,7 +51,7 @@ Method: POST

The result contains the following properties:

* `_id`: user's [kuid](/core/1/guides/kuzzle-depth/authentication#the-kuzzle-user-identifier)
* `_id`: user's [kuid](/core/2/guides/kuzzle-depth/authentication#the-kuzzle-user-identifier)
* `jwt`: encrypted JSON Web Token, that must then be sent in the [requests headers](core/1/api/essentials/query-syntax#http) or in the [query](core/1/api/essentials/query-syntax#other-protocols)
* `expiresAt`: new token expiration date, in Epoch-millis (UTC)
* `ttl`: new token time to live, in milliseconds
@@ -10,7 +10,7 @@ title: updateSelf

Updates the currently logged in user information.

This route cannot update the list of associated security profiles. To change a user's security profiles, the route [security:updateUser](/core/1/api/controllers/security/update-user) must be used instead.
This route cannot update the list of associated security profiles. To change a user's security profiles, the route [security:updateUser](/core/2/api/controllers/security/update-user) must be used instead.

---

@@ -64,7 +64,7 @@ User properties that can be set or updated depend on the application hosted by K

Returns the following properties:

- `_id`: current user's [kuid](/core/1/guides/essentials/user-authentication#kuzzle-user-identifier-kuid)
- `_id`: current user's [kuid](/core/2/guides/essentials/user-authentication#kuzzle-user-identifier-kuid)
- `_source`: additional (and optional) user properties

```js
@@ -8,9 +8,9 @@ title: import

Creates, updates or deletes large amounts of documents as fast as possible.

This route is faster than the `document:m*` routes family (e.g. [document:mCreate](/core/1/api/controllers/document/m-create)), but no real-time notifications will be generated, even if some of the documents in the import match subscription filters.
This route is faster than the `document:m*` routes family (e.g. [document:mCreate](/core/2/api/controllers/document/m-create)), but no real-time notifications will be generated, even if some of the documents in the import match subscription filters.

If some documents actions fail, the client will receive a [PartialError](/core/1/api/essentials/errors#partialerror) error.
If some documents actions fail, the client will receive a [PartialError](/core/2/api/essentials/errors#partialerror) error.

---

File renamed without changes.
@@ -12,9 +12,9 @@ title: mWrite
Create or replace multiple documents directly into the storage engine.

This is a low level route intended to bypass Kuzzle actions on document creation, notably:
- check [document validity](/core/1/guides/essentials/data-validation),
- add [kuzzle metadata](/core/1/guides/essentials/document-metadata),
- trigger [realtime notifications](/core/1/guides/essentials/real-time) (unless asked otherwise)
- check [document validity](/core/2/guides/essentials/data-validation),
- add [kuzzle metadata](/core/2/guides/essentials/document-metadata),
- trigger [realtime notifications](/core/2/guides/essentials/real-time) (unless asked otherwise)

---

@@ -109,7 +109,7 @@ Each created document is an object with the following properties:
- `_version`: version number of the document
- `created`: a boolean telling whether a document is created

If one or more document creations fail, the response status is set to `206`, and the `error` object contains a [partial error](/core/1/api/essentials/errors#partialerror) error.
If one or more document creations fail, the response status is set to `206`, and the `error` object contains a [partial error](/core/2/api/essentials/errors#partialerror) error.

### Example

@@ -11,9 +11,9 @@ title: write
Create or replace a document directly into the storage engine.

This is a low level route intended to bypass Kuzzle actions on document creation, notably:
- check [document validity](/core/1/guides/essentials/data-validation),
- add [kuzzle metadata](/core/1/guides/essentials/document-metadata),
- trigger [realtime notifications](/core/1/guides/essentials/real-time) (unless asked otherwise).
- check [document validity](/core/2/guides/essentials/data-validation),
- add [kuzzle metadata](/core/2/guides/essentials/document-metadata),
- trigger [realtime notifications](/core/2/guides/essentials/real-time) (unless asked otherwise).

---

@@ -6,19 +6,19 @@ title: create

# create

Creates a new [collection](/core/1/guides/essentials/store-access-data), in the provided `index`.
Creates a new [collection](/core/2/guides/essentials/store-access-data), in the provided `index`.

<SinceBadge version="1.3.0" />

You can also provide an optional body with a [collection mapping](/core/1/guides/essentials/database-mappings) allowing you to exploit the full capabilities of our persistent data storage layer.
You can also provide an optional body with a [collection mapping](/core/2/guides/essentials/database-mappings) allowing you to exploit the full capabilities of our persistent data storage layer.

This method will only update the mapping when the collection already exists.

<SinceBadge version="1.7.1" />

You can define the collection [dynamic mapping policy](/core/1/guides/essentials/database-mappings#dynamic-mapping-policy) by setting the `dynamic` field to the desired value.
You can define the collection [dynamic mapping policy](/core/2/guides/essentials/database-mappings#dynamic-mapping-policy) by setting the `dynamic` field to the desired value.

You can define [collection additional metadata](/core/1/guides/essentials/database-mappings#collection-metadata) within the `_meta` root field.
You can define [collection additional metadata](/core/2/guides/essentials/database-mappings#collection-metadata) within the `_meta` root field.

---

@@ -95,9 +95,9 @@ Body:

### Optional:

* `dynamic`: [dynamic mapping policy](/core/1/guides/essentials/database-mappings#dynamic-mapping-policy) for new fields. Allowed values: `true` (default), `false`, `strict`
* `_meta`: [collection additional metadata](/core/1/guides/essentials/database-mappings#collection-metadata) stored next to the collection
* `properties`: object describing the data mapping to associate to the new collection, using [Elasticsearch types definitions format](/core/1/guides/essentials/database-mappings#properties-types-definition)
* `dynamic`: [dynamic mapping policy](/core/2/guides/essentials/database-mappings#dynamic-mapping-policy) for new fields. Allowed values: `true` (default), `false`, `strict`
* `_meta`: [collection additional metadata](/core/2/guides/essentials/database-mappings#collection-metadata) stored next to the collection
* `properties`: object describing the data mapping to associate to the new collection, using [Elasticsearch types definitions format](/core/2/guides/essentials/database-mappings#properties-types-definition)

---

@@ -124,5 +124,5 @@ Returns a confirmation that the collection is being created:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [PreconditionError](/core/1/api/essentials/errors#preconditionerror)
- [Common errors](/core/2/api/essentials/errors#common-errors)
- [PreconditionError](/core/2/api/essentials/errors#preconditionerror)
@@ -65,4 +65,4 @@ Returns a confirmation that the specifications are deleted:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [Common errors](/core/2/api/essentials/errors#common-errors)
@@ -62,4 +62,4 @@ Returns a boolean telling whether the provided collection exists:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [Common errors](/core/2/api/essentials/errors#common-errors)
@@ -10,7 +10,7 @@ Returns a collection mapping.

<SinceBadge version="1.7.1" />

Also returns the collection [dynamic mapping policy](/core/1/guides/essentials/database-mappings#dynamic-mapping-policy) and [collection additional metadata](/core/1/guides/essentials/database-mappings#collection-metadata).
Also returns the collection [dynamic mapping policy](/core/2/guides/essentials/database-mappings#dynamic-mapping-policy) and [collection additional metadata](/core/2/guides/essentials/database-mappings#collection-metadata).

---

@@ -101,5 +101,5 @@ Returns a mapping object with the following structure:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [NotFoundError](/core/1/api/essentials/errors#notfounderror)
- [Common errors](/core/2/api/essentials/errors#common-errors)
- [NotFoundError](/core/2/api/essentials/errors#notfounderror)
@@ -78,5 +78,5 @@ Returns a specifications object with the following properties:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [NotFoundError](/core/1/api/essentials/errors#notfounderror)
- [Common errors](/core/2/api/essentials/errors#common-errors)
- [NotFoundError](/core/2/api/essentials/errors#notfounderror)
File renamed without changes.
@@ -103,5 +103,5 @@ Example:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [NotFoundError](/core/1/api/essentials/errors#notfounderror)
- [Common errors](/core/2/api/essentials/errors#common-errors)
- [NotFoundError](/core/2/api/essentials/errors#notfounderror)
@@ -8,7 +8,7 @@ title: scrollSpecifications



Moves a result set cursor forward, created by the [`searchSpecifications` request](/core/1/api/controllers/collection/search-specifications) when the `scroll` argument is provided.
Moves a result set cursor forward, created by the [`searchSpecifications` request](/core/2/api/controllers/collection/search-specifications) when the `scroll` argument is provided.

Results returned by a `scroll` request reflect the state of the index at the time of the initial search request, like a fixed snapshot. Subsequent changes to documents do not affect the scroll results.

@@ -40,7 +40,7 @@ Method: GET

- `collection`: collection name
- `index`: index name
- `scrollId`: cursor identifier, obtained with (/core/1/api/controllers/collection/search-specifications)
- `scrollId`: cursor identifier, obtained with (/core/2/api/controllers/collection/search-specifications)

### Optional:

@@ -110,5 +110,5 @@ Example:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [NotFoundError](/core/1/api/essentials/errors#notfounderror)
- [Common errors](/core/2/api/essentials/errors#common-errors)
- [NotFoundError](/core/2/api/essentials/errors#notfounderror)
@@ -59,7 +59,7 @@ Body:
### Optional:

- `from` is usually used with the `size` argument, and defines the offset from the first result you want to fetch
- `scroll` is used to fetch large result sets, and it must be set with a [time duration](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/common-options.html#time-units). If set, a forward-only cursor will be created (and automatically destroyed at the end of the set duration), and its identifier will be returned in the `scrollId` property, along with the first page of the results. This cursor can then be moved forward using the [`scrollSpecifications` API action](/core/1/api/controllers/collection/scroll-specifications)
- `scroll` is used to fetch large result sets, and it must be set with a [time duration](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/common-options.html#time-units). If set, a forward-only cursor will be created (and automatically destroyed at the end of the set duration), and its identifier will be returned in the `scrollId` property, along with the first page of the results. This cursor can then be moved forward using the [`scrollSpecifications` API action](/core/2/api/controllers/collection/scroll-specifications)
- `size` controls the maximum number of documents returned in the response

---
@@ -134,4 +134,4 @@ Example:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [Common errors](/core/2/api/essentials/errors#common-errors)
@@ -64,5 +64,5 @@ Returns a confirmation that the collection is being emptied:

## Possible errors

- [Common errors](/core/1/api/essentials/errors#common-errors)
- [NotFoundError](/core/1/api/essentials/errors#notfounderror)
- [Common errors](/core/2/api/essentials/errors#common-errors)
- [NotFoundError](/core/2/api/essentials/errors#notfounderror)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.