Hi,
I was playing with Dremio API and I can’t understand how to work with catalogs.
After I get the login token, I do:
GET http://localhost:9047/api/v3/catalog
and the result is something like this:
{
“data”: [
{
“id”: “0fef5580-2192-4d8c-b1c0-d41b00ea134d”,
“path”: [
“@ds-ui”
],
“tag”: “0”,
“type”: “CONTAINER”,
“containerType”: “HOME”
},
{
“id”: “f0eda547-f146-481b-babe-ad156d870a11”,
“path”: [
“Test”
],
“tag”: “0”,
“type”: “CONTAINER”,
“containerType”: “SOURCE”
}
]
}
GET http://localhost:9047/api/v3/catalog/f0eda547-f146-481b-babe-ad156d870a11
{
“entityType”: “source”,
“config”: {
“path”: “/var/data/warehouse”
},
“state”: {
“status”: “good”,
“messages”: []
},
“id”: “f0eda547-f146-481b-babe-ad156d870a11”,
“tag”: “0”,
“type”: “NAS”,
“name”: “Test”,
“createdAt”: “2018-10-16T07:36:14.892Z”,
“metadataPolicy”: {
“authTTLMs”: 86400000,
“namesRefreshMs”: 3600000,
“datasetRefreshAfterMs”: 60000,
“datasetExpireAfterMs”: 180000,
“datasetUpdateMode”: “PREFETCH_QUERIED”
},
“accelerationGracePeriodMs”: 10800000,
“accelerationRefreshPeriodMs”: 3600000,
“accelerationNeverExpire”: false,
“accelerationNeverRefresh”: false,
“children”: [
{
“id”: “dremio:/Test/“prova””,
“path”: [
“Test”,
““prova””
],
“type”: “CONTAINER”,
“containerType”: “FOLDER”
}
]
}
Now comes the problem, i want to go down and reach the entity /Test/prova/000 that is an already defined dataset over a folder that contains a parquet file. But first i want to check /Test/“prova”.
Accordingly to the API reference I try getting a folder using it’s ID:
GET http://localhost:9047/api/v3/catalog/dremio%3A/Test/“prova” (there are percent22 before and after “prova” but this forum replaces them with double quotes)
This fails… and this is exactly the same url that the tutorial tries to get. The error is “404 Not found”.
To test if there is some url encoding problem, I tried with an external tool to play with escapes but none of my attempts worked, I always get 404.
Where’s the problem?
Thanks