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

Basic server side export API for saved objects #30326

Merged
merged 68 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
593418e
Initial work for new server side export API
mikecote Feb 5, 2019
bd718b4
Revert UI changes, API only in this PR
mikecote Feb 6, 2019
dcbcfd6
Remove whitespace at top of export.asciidoc
mikecote Feb 6, 2019
0cb0eb9
Add tests around limitations
mikecote Feb 6, 2019
39f4369
Add comment
mikecote Feb 6, 2019
f686c37
Convert some files to typescript
mikecote Feb 6, 2019
47092b9
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 7, 2019
8e62c27
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 8, 2019
05b54a7
Move Boom.boomify to where the errors are created
mikecote Feb 8, 2019
443b16a
Use Boom.badRequest for now
mikecote Feb 8, 2019
f237623
Fix lint issue
mikecote Feb 8, 2019
41674ff
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 8, 2019
a2cc1bb
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 10, 2019
063adcf
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 11, 2019
d071a36
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 11, 2019
398e56d
Move files
mikecote Feb 11, 2019
f1013a3
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 11, 2019
96c710f
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 13, 2019
b55ad39
Update tests
mikecote Feb 13, 2019
8cdfec2
Add functional test
mikecote Feb 13, 2019
f14b0c9
Export all documents by default
mikecote Feb 13, 2019
737e6a2
Update test assertions
mikecote Feb 13, 2019
63bcbcc
Use ~10000 saved objects in export api integration test
mikecote Feb 13, 2019
1cc21d0
Convert route to typescript, add content-type response header
mikecote Feb 15, 2019
b79e110
Move some tests to api_integration
mikecote Feb 15, 2019
c017ecf
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 19, 2019
cfc394e
Use new sort and rename functions/variables
mikecote Feb 19, 2019
b516a6e
Move tests to API integration
mikecote Feb 19, 2019
09f208d
Cleanup and finalize api integration tests
mikecote Feb 19, 2019
f874fc4
Make type or objects required but not both in the same call
mikecote Feb 19, 2019
99239cb
Add spaces / security tests
mikecote Feb 19, 2019
26286a7
Add noTypeOrObjects to security / spaces tests
mikecote Feb 19, 2019
a93d17e
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 20, 2019
d45ded9
Use json-stable-stringify and add tests for export ordering
mikecote Feb 20, 2019
b16698e
Address self feedback, add without kibana index test
mikecote Feb 20, 2019
056998a
Only allow export API to export index-pattern, dashboard, visualizati…
mikecote Feb 22, 2019
1d37196
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 22, 2019
82ffb86
Make import export size configurable and fix broken tests
mikecote Feb 22, 2019
94a69fa
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 22, 2019
15b8d03
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 25, 2019
88d0c04
Fix broken tests
mikecote Feb 25, 2019
da4d057
Move test config to mock server
mikecote Feb 25, 2019
254528f
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 25, 2019
95439d4
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 27, 2019
c432676
Add more typescript types instead of using any
mikecote Feb 27, 2019
4057001
Convert request from GET to POST
mikecote Feb 27, 2019
e815636
Fix saved objects mixin test
mikecote Feb 27, 2019
9057341
Merge with master
mikecote Feb 27, 2019
b5ce29f
Update src/legacy/server/saved_objects/lib/export.ts
Feb 28, 2019
d3360c7
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 28, 2019
8482ae3
Apply PR feedback
mikecote Feb 28, 2019
a246255
Merge branch 'saved-object/basic-export' of github.com:mikecote/kiban…
mikecote Feb 28, 2019
e43f5ab
Fix lint error
mikecote Feb 28, 2019
56519c3
Update test snapshots due to jest upgrade
mikecote Feb 28, 2019
f223bbd
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Feb 28, 2019
ec662db
Add error handling for bulkGet
mikecote Feb 28, 2019
0cd21fa
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Mar 1, 2019
6c6c646
Split export API into two endpoints
mikecote Mar 1, 2019
c3fe83b
Update src/legacy/server/saved_objects/routes/export_by_type.test.ts
Mar 1, 2019
44240fc
Update docs/api/saved-objects/export_by_type.asciidoc
Mar 1, 2019
25cd490
Update docs/api/saved-objects/export_by_type.asciidoc
Mar 1, 2019
c7fc57d
Update src/legacy/server/saved_objects/routes/export_objects.test.ts
Mar 1, 2019
00db26d
Apply PR feedback
mikecote Mar 1, 2019
10acc3f
Merge with master
mikecote Mar 4, 2019
8198687
MockServer -> createMockServer
mikecote Mar 4, 2019
89ebd58
Revert back to single API
mikecote Mar 5, 2019
aa4550a
Merge branch 'master' of github.com:elastic/kibana into saved-object/…
mikecote Mar 5, 2019
4ae7da1
Re-apply PR feedback
mikecote Mar 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api/saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ include::saved-objects/create.asciidoc[]
include::saved-objects/bulk_create.asciidoc[]
include::saved-objects/update.asciidoc[]
include::saved-objects/delete.asciidoc[]
include::saved-objects/export.asciidoc[]
34 changes: 34 additions & 0 deletions docs/api/saved-objects/export.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[[saved-objects-api-export]]
=== Export Objects

experimental[This functionality is *experimental* and may be changed or removed completely in a future release.]
mikecote marked this conversation as resolved.
Show resolved Hide resolved

The export saved object API enables you to retrieve a set of Kibana saved objects by various conditions into a newline delimited JSON format.

Note: You cannot access this endpoint via the Console in Kibana.

==== Request

`GET /api/saved_objects/_export`

==== Query Parameters
`type` (optional)::
(array|string) The saved object type(s) that the export should be limited to
`objects` (optional)::
(array) A list of objects to export
mikecote marked this conversation as resolved.
Show resolved Hide resolved

==== Response body

The response body will have a format of newline delimited JSON. The order of these objects is not guaranteed other than having dependencies defined first.

==== Examples

The following example attempts to export index patterns

[source,js]
--------------------------------------------------
GET api/saved_objects/_export?type=index-patterns
--------------------------------------------------
// KIBANA

A successful call returns a response code of `200` along with the exported objects as the response body.
Loading