-
Notifications
You must be signed in to change notification settings - Fork 8
Add new endpoint /_api/key-generators
#420
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
Changes from 3 commits
97a1a8f
e6852f2
3aee857
8d219c0
5acd804
2dc9afb
8cd7bf1
0e6d9e3
627449a
548b3ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -950,6 +950,57 @@ logJsonResponse(response); | |
| db._drop(cn); | ||
| ``` | ||
|
|
||
| ### Get the available key generators | ||
|
|
||
| ```openapi | ||
| paths: | ||
| /_api/key-generators: | ||
| get: | ||
| operationId: getKeyGenerators | ||
| description: | | ||
| Returns the available key generators for collections. | ||
|
|
||
| The call returns a JSON object with the available key generators | ||
| on success: | ||
|
|
||
| - `padded` | ||
| - `uuid` | ||
| - `autoincrement` | ||
| - `traditional` | ||
| responses: | ||
| '200': | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Simran-B I applied your suggestion but the output is not right, see https://deploy-preview-420--docs-hugo.netlify.app/devel/develop/http-api/collections/#get-the-available-key-generators_res_200 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks great! |
||
| description: | | ||
| The available generators for document keys. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: array | ||
|
||
| uniqueItems: true | ||
| items: | ||
| type: string | ||
| enum: | ||
| - padded | ||
| - uuid | ||
| - autoincrement | ||
| - traditional | ||
| tags: | ||
| - Collections | ||
| ``` | ||
|
|
||
| **Examples:** | ||
|
|
||
| ```curl | ||
| --- | ||
| description: |- | ||
| Retrieving the key generators for collections: | ||
| name: RestCollectionGetKeyGenerators | ||
| --- | ||
| var url = "/_api/key-generators" | ||
| var response = logCurlRequest('GET', url); | ||
| assert(response.code === 200); | ||
| logJsonResponse(response); | ||
| ``` | ||
|
|
||
| ## Create and delete collections | ||
|
|
||
| ### Create a collection | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.