API and Ansible - Create dashboard using folderUid

I have a question or maybe a feature request.

When I create a folder, I can specify a uid:

POST /api/folders

“uid”: “nErXDvCkzz”,
“title”: “my new folder”

Immediately after that, I need to put a dashboard in that folder:

POST /api/dashboards/db

“dashboard”: {

“folderId”: 0,
“overwrite”: false

But I need to catch the ID from the responce of folder creation. Is this correct?
It would not be useful to use the folder UID in dashboard deploy? This would allow to skip the ID catch.

I have this problem because using Ansible I founded some trouble to catch a returned value (in this case folderId) and using it like integer in dashboard creation payload:

- name: Create a Dashboard
    url: "http://my.host.org:3000/api/dashboards/db"
    method: POST
    user: admin
    password: admin
    status_code: 200
    force_basic_auth: yes
      folderId: 34 <- integer. I can't use something like: {{ folderId_catched_after_folder_creation }} because it's a string
      overwrite: false
      dashboard: "{{ my_dashboard }}"
    body_format: json

Sorry for this little issue described with a long post.
Thanks so much.

I also had problem creating dashboard in folder. I use postman and created folder first and used the folderid from response and used that in my create dashboard api call:
Content-Type: application/json
Accept: application/json
Basic auth: admin/admin
body of post:

“type”: “db”,
“canSave”: true,
“canEdit”: true,
“canAdmin”: true,
“canStar”: true,
“slug”: “gw-template-variables”,
“url”: “/grafana/d/GWDASH0002/gw-template-variables”,

“folderId”: 16,
“folderTitle”: “Groundwork Grafana Templates”,
“folderUrl”: “/grafana/dashboards/f/GWFOLD0001/groundwork-grafana-templates”

“uid”: “GWDASH0002”,

“id”: 21,
“slug”: “gw-template-variables”,
“status”: “success”,
“uid”: “GWDASH0002”,
“url”: “/grafana/d/GWDASH0002/gw-template-variables”,
“version”: 1

dashboard was created but ended up in General folder