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.8K All Categories
- 3 Private Company Board
- 1 APAC User Group
- 12 Welcome
- 39 Domo News
- 9.7K Using Domo
- 1.9K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 343 Workbench
- 260 Domo Best Practices
- 11 Domo Certification
- 465 Domo Developer
- 50 Domo Everywhere
- 106 Apps
- 716 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 27 お知らせ
- 64 Kowaza
- 299 仲間に相談
- 654 ひらめき共有