Can't add data bags from file

I created data bag at chef server

knife data bag create api-sites

And tried to add item from file

knife data bag from file data_bags/api-sites/api.json

But when I tried show command output was blank

knife data bag show api-sites

Before I added data bags and didn't have such problems. What can be wrong?

You still need to pass the BAG when you upload from a file. So the correct syntax is:

knife data bag from file BAG FILE|FOLDER [FILE|FOLDER..] (options)

or in your case

knife data bag from file api-sites data_bags/api-sites/api.json

Thank you. It worked.
I looked through my history and there was almost right one :slight_smile: