Group API: Harmonize result object for 'list' and 'get details' objects
I was just trying out the Groups API and sumbled across a small glitch. LIke the other get-catalog calls, there's are "list resources" and "get resouce details" calls. With something like a DataSet, the "list" object is small and the "details" object is big. In the case of the Group API, the objects have four elements each. Between them, they have five elements. Here's a stripped down comparison:
List groups:
{
"id": 2079369920,
"name": "Groupy McGroupface",
"memberCount": 2,
"default": false
}
Retrieve group:
{
"id": 2079369920,
"name": "Groupy McGroupface",
"memberCount": 2,
"active": true
}
Given there is so little data required here, it would be nice (and not costly) to combine the elements and return an identical object with either type of request:
Combined:
{
"id": 2079369920,
"name": "Groupy McGroupface",
"memberCount": 2,
"default": false,
"active": true
}
I ask because what I like to do is pull down the list, iterate through pulling down the details, and save the unparsed details in a record. Then I can keep the parser code entirely distinct from the fetching code. This is handy for distributing the work and, more to the point, testing out and working on my parsers without constantly having to do a fresh pull. So, it's more convenient when the "details" version of the information includes all of the details. In this case, the default tag is all that's missing from the details result.
Thanks.
Comments
-
It looks like detail also returns creatorId. A simpler version of my request is simply to add "default" to the details response. For now, I'm injecting it by hand before storing.
0
Categories
- 10.6K All Categories
- APAC User Group
- 12 Welcome
- 36 Domo News
- 9.6K Using Domo
- 1.9K Dataflows
- 2.4K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 339 Workbench
- 251 Domo Best Practices
- 11 Domo Certification
- 461 Domo Developer
- 47 Domo Everywhere
- 100 Apps
- 703 New to Domo
- 84 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 22 お知らせ
- 62 Kowaza
- 296 仲間に相談
- 649 ひらめき共有