How can I get dynamic gutenberg block attributes from rest api?

Hi everyone

I am developing a website using rest api. and I created a dynamic block using the @wordpress/create-block package. rest api gives me gutenberg blocks as rendered html but since I am developing a site using react, rendered html is not working for me. Is there a way to get the blocks as Names and attributes?

it looks like this in the page editor:

As can be seen in the picture, the rest api returns the blocks as rendered html:
2023-07-01 162627

In order to render with React, instead of getting it as html, I need to get it as block name and attribute, for example:

"blockData": [
        
    "blockName": "dynamic-block/last-posts",
    "attributes": {
         "size": "1400px",
         ...
    },

    "innerBlocks" :[
         {
             "blockName": "dynamic-block/post",
             "attributes": {
               "content": "post content"
                 ....
             },
         },
         {
             "blockName": "dynamic-block/post",
             "attributes": {
                 "content": "post content"
                 ....
             },
         },
         {
             "blockName": "dynamic-block/post",
             "attributes": {
                 "content": "post content"
                 ....
             },
         }
     ]
]

This is basically what I want, There is a plugin that presents block data this way, but it only works for static blocks.

thank you for your help.

Don’t print the details before. The best way is to use “shortcut” and run the shortcut with the “gutenberg”.