Spaces method and path for this operation:
Refer to Spaces for more information.
Create a Kibana saved object with a randomly generated identifier.
WARNING: This API is intended to be removed in a future Elastic stack version. Consider using the import API for your use case.
NOTE: For forward compatibility, include coreMigrationVersion and typeMigrationVersion when creating saved objects outside of Kibana or when persisting raw saved objects outside of Kibana.
Body
Required
-
The data that you want to create. WARNING: Attributes may be validated depending on the saved object type. Supplying malformed data can cause errors or break Kibana. When creating or persisting raw saved objects outside of Kibana, preserve
coreMigrationVersionandtypeMigrationVersion(and related migration metadata) to retain forward compatibility across Kibana versions. -
The Kibana version that last migrated this document. When creating saved objects outside of Kibana, preserve this field to retain forward compatibility.
-
Identifiers for the spaces in which this object is created. If this is provided, the object is created only in the explicitly defined spaces. If this is not provided, the object is created in the current space (default behavior). For shareable object types (registered with
namespaceType: 'multiple'), this option can be used to specify one or more spaces, including the "All spaces" identifier (''). For isolated object types (registered withnamespaceType: 'single'ornamespaceType: 'multiple-isolated'), this option can only be used to specify a single space, and the "All spaces" identifier ('') is not allowed. For global object types (registered withnamespaceType: agnostic`), this option cannot be used. -
Objects with
name,id, andtypeproperties that describe the other saved objects that this object references. Usenamein attributes to refer to the other saved object, but never theid, which can update automatically during migrations or import and export. -
The type version that last migrated this document. When creating saved objects outside of Kibana, preserve this field to retain forward compatibility.
curl \
--request POST 'https://localhost:5601/api/saved_objects/{type}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: string" \
--data '{"attributes":{},"coreMigrationVersion":"string","initialNamespaces":[],"references":[],"typeMigrationVersion":"string"}'