Skip to content

Instantly share code, notes, and snippets.

@arc279
Last active February 8, 2019 08:53
Show Gist options
  • Select an option

  • Save arc279/70347a159e936a4581d212a473963f69 to your computer and use it in GitHub Desktop.

Select an option

Save arc279/70347a159e936a4581d212a473963f69 to your computer and use it in GitHub Desktop.
#!/bin/bash
# cf.
# https://www.elastic.co/guide/en/kibana/6.4/saved-objects-api-find.html
# https://www.elastic.co/guide/en/kibana/6.4/saved-objects-api-bulk-get.html
URL_BASE=http://localhost:5601
curl -s ${URL_BASE}/api/saved_objects/_find?per_page=1000 \
| jq '[.saved_objects[]|{"id", "type"}]' \
| curl -s -H "kbn-xsrf: reporting" -H 'Content-Type: application/json' ${URL_BASE}/api/saved_objects/_bulk_get -d @-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment