X-ray survey with microcalorimeters: from GRB in the far universe to diffuse emission in our galaxy