Hi @Sayantan Ganguly,
Per my test, you could use following api to get all aspx file.
/_api/search/query?querytext='FileExtension:aspx'
Please check if the pages contain files like html, css , js. The api only returns pages which extension is aspx. If you have some html pages, you will need to change the file extension to html.
YOu can also create the refinement options yourself. how to do this in code: http://techmikael.blogspot.com/2011/08/creating-refinement-query-parameter-for.html
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.