kibana/docs/api/saved-objects/export.asciidoc
2019-09-18 10:54:28 -05:00

67 lines
1.5 KiB
Text

[[saved-objects-api-export]]
=== Export objects API
++++
<titleabbrev>Export objects</titleabbrev>
++++
experimental[] Retrieve a set of saved objects that you want to import into {kib}.
[[saved-objects-api-export-request]]
==== Request
`POST /api/saved_objects/_export`
[[saved-objects-api-export-request-request-body]]
==== Request body
`type`::
(Optional, array|string) The saved object types to include in the export.
`objects`::
(Optional, array) A list of objects to export.
`includeReferencesDeep`::
(Optional, boolean) Includes all of the referenced objects in the exported objects.
TIP: You must include `type` or `objects` in the request body.
[[saved-objects-api-export-request-response-body]]
==== Response body
The format of the response body includes newline delimited JSON.
[[export-objects-api-create-request-codes]]
==== Response code
`200`::
Indicates a successful call.
[[ssaved-objects-api-create-example]]
==== Examples
Export all index pattern saved objects:
[source,js]
--------------------------------------------------
POST api/saved_objects/_export
{
"type": "index-pattern"
}
--------------------------------------------------
// KIBANA
Export a specific saved object:
[source,js]
--------------------------------------------------
POST api/saved_objects/_export
{
"objects": [
{
"type": "dashboard",
"id": "be3733a0-9efe-11e7-acb3-3dab96693fab"
}
]
}
--------------------------------------------------
// KIBANA