{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/vault/issues/243","labels_url":"https://api.github.com/repos/hashicorp/vault/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/vault/issues/243/comments","events_url":"https://api.github.com/repos/hashicorp/vault/issues/243/events","html_url":"https://github.com/hashicorp/vault/issues/243","id":78591780,"number":243,"title":"Extracting secret value back to file","user":{"login":"james-masson","id":1453988,"avatar_url":"https://avatars.githubusercontent.com/u/1453988?v=3","gravatar_id":"","url":"https://api.github.com/users/james-masson","html_url":"https://github.com/james-masson","followers_url":"https://api.github.com/users/james-masson/followers","following_url":"https://api.github.com/users/james-masson/following{/other_user}","gists_url":"https://api.github.com/users/james-masson/gists{/gist_id}","starred_url":"https://api.github.com/users/james-masson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/james-masson/subscriptions","organizations_url":"https://api.github.com/users/james-masson/orgs","repos_url":"https://api.github.com/users/james-masson/repos","events_url":"https://api.github.com/users/james-masson/events{/privacy}","received_events_url":"https://api.github.com/users/james-masson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/vault/labels/enhancement","name":"enhancement","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-20T16:23:12Z","updated_at":"2015-05-21T00:43:43Z","closed_at":null,"body":"Hi,\r\n\r\nI've written the contents of a file to Vault with the usual syntax\r\n```\r\nvault write secret/bitbucket-key value=@myfile\r\n```\r\nIn my case, this is an RSA key. Now I'm trying to read it back out into a file again.\r\n\r\nThe ```vault read``` output options either give me a tabular format, or a JSON format - Neither of which are trivial to process back into the exact original text file.\r\n\r\nI've also looked at using curl via the API directly - but that too gives me back a (slightly different) JSON format.\r\n\r\nRight now, I'm looking at piping the command line ```vault read -format=json``` output through a few bits of Python code to extract only the value, and write that to a file. This seems a little inelegant.\r\n\r\nHave I missed a better way to do this?\r\n\r\nIf not, I'd like to request a command line feature to...\r\n\r\neither:\r\n* Output only the value\r\n\r\nor\r\n* Write the value to a file directly\r\n\r\nthanks!"},"comment":{"url":"https://api.github.com/repos/hashicorp/vault/issues/comments/104082495","html_url":"https://github.com/hashicorp/vault/issues/243#issuecomment-104082495","issue_url":"https://api.github.com/repos/hashicorp/vault/issues/243","id":104082495,"user":{"login":"armon","id":592032,"avatar_url":"https://avatars.githubusercontent.com/u/592032?v=3","gravatar_id":"","url":"https://api.github.com/users/armon","html_url":"https://github.com/armon","followers_url":"https://api.github.com/users/armon/followers","following_url":"https://api.github.com/users/armon/following{/other_user}","gists_url":"https://api.github.com/users/armon/gists{/gist_id}","starred_url":"https://api.github.com/users/armon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armon/subscriptions","organizations_url":"https://api.github.com/users/armon/orgs","repos_url":"https://api.github.com/users/armon/repos","events_url":"https://api.github.com/users/armon/events{/privacy}","received_events_url":"https://api.github.com/users/armon/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T00:43:43Z","updated_at":"2015-05-21T00:43:43Z","body":"@sethvargo I think so. I think it just dumps the raw JSON body out."}}