Hi Everyone,
I'm playing around with the new API version 2.0 and have some trouble, when it comes to fetch information from a not top level dataset.
I try to use the following curl command to get responses:
while $key is my api key generated on the webinterface and $2 is the actual dataset id I want to query.
Here some example ids I also get from the API v2.0 as response:
now to my Problem I can get detailed information from the dataset(basiclly it is the pool) localpool-one with the curl above without problems.
But as soon as I what to get details for one of the sub-datasets(actually datasets) I get a
I tried the following combinations with the first one working and the following 2 are not.
I see 3 possibilities with this issue:
first:
I also noticed that the JSON response from the top-level had many informations about the so called "childrens".
So am I supposed to only get Informations from the top-level and search my way thru the JSON response for children informations, but if this is the case i think the naming dataset for the query is confusing.
second:
I am doing some thing wrong. In this case I hope someone can help me.
third:
Is this as Bug?
I already scripted this stuff together so I can post it if it will help.
And I'm running an Truenas Core Release 12
Regards,
Alex
PS: as much as I dislike this sentence in formus. I'm not a native english speaker, so I'm sorry for any kind of misspelling or grammatical failures.
I'm playing around with the new API version 2.0 and have some trouble, when it comes to fetch information from a not top level dataset.
I try to use the following curl command to get responses:
Code:
curl "https://$host/api/v2.0/pool/dataset/id/$2" -k -X GET -H "Authorization: Bearer $key"
while $key is my api key generated on the webinterface and $2 is the actual dataset id I want to query.
Here some example ids I also get from the API v2.0 as response:
Code:
id: localpool-one id: localpool-one/iocage id: localpool-one/iocage/images id: localpool-one/iocage/releases
now to my Problem I can get detailed information from the dataset(basiclly it is the pool) localpool-one with the curl above without problems.
But as soon as I what to get details for one of the sub-datasets(actually datasets) I get a
404: Not Found
as response.I tried the following combinations with the first one working and the following 2 are not.
Code:
curl "https://$host/api/v2.0/pool/dataset/id/localpool-one" -k -X GET -H "Authorization: Bearer $key" curl "https://$host/api/v2.0/pool/dataset/id/localpool-one/iocage -k -X GET -H "Authorization: Bearer $key" curl "https://$host/api/v2.0/pool/dataset/id/iocage" -k -X GET -H "Authorization: Bearer $key"
I see 3 possibilities with this issue:
first:
I also noticed that the JSON response from the top-level had many informations about the so called "childrens".
So am I supposed to only get Informations from the top-level and search my way thru the JSON response for children informations, but if this is the case i think the naming dataset for the query is confusing.
second:
I am doing some thing wrong. In this case I hope someone can help me.
third:
Is this as Bug?
I already scripted this stuff together so I can post it if it will help.
And I'm running an Truenas Core Release 12
Regards,
Alex
PS: as much as I dislike this sentence in formus. I'm not a native english speaker, so I'm sorry for any kind of misspelling or grammatical failures.