Closed taojing2002 closed 4 years ago
In our design document, the rest call looks like:
UsageList = listUsage(): GET /usage?quotaType=:quotaType&instanceId=:instanceId&subscriber=:subscriber
So the Jason String should be a UsageList object which contains a list of usage. However, it directly returns a list of usages.
curl -k -H "Authorization: Bearer ${token}" "https://docker-dev-ucsb-1.test.dataone.org:30443/bookkeeper/v1/usages/?quotaId=4&instanceId=urn%3Auuidfa4df84d-31c0-430c-bb2d-506662cec307" [{"id":4,"object":"usage","quotaId":4,"instanceId":"urn:uuidfa4df84d-31c0-430c-bb2d-506662cec307","quantity":1.0,"status":"active","nodeId":"urn:node:METACAT_TEST"}]
The current returned result is not a list of usage objects, but pairs of name/value.
UsagesResource.listUsages() now returns a UsageList object. Fixed in commit 2b7a33f501589b56153e1346d806e1cfbb7b75f6
UsageList
In our design document, the rest call looks like:
So the Jason String should be a UsageList object which contains a list of usage. However, it directly returns a list of usages.