Hi!
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
uri:
url: "http://my.host.org:3000/api/dashboards/db"
method: POST
user: admin
password: admin
status_code: 200
force_basic_auth: yes
body:
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.