Please dd a "Get Count" call to the API for DataSets and other resources

I'm checking out the Domo APIs to see about automating some of our admin and audit tasks. So far, it looks promising and pretty straightforward. I've noticed that there are a lot of 'catalog' calls to retrieve resource definitions, such as

 

GET https://api.domo.com/v1/datasets?offset=0&limit=50

There's a limit of 50 definitions per result for this service. To get the full catalog, you have to loop, advance the offset, and exit the loop when you don't get any more results. That works okay, but you always have to over-interrogate the service and you can't estimate how far you are into the task in advance. Progress is nice to know if you're in a context where you want to display a thermometer, etc. It would be a nice refinement to provide a "get count" service, something like this:

 

GET https://api.domo.com/v1/datasets/count

 

All it needs to return is the count of DataSets, like 97 or what have you. Formatted as you like.

 

The same suggestion applies to any of the similar catalog API calls. The endpoints might look like this (or some better way that you devise):

 

https://api.domo.com/v1/datasets/count
https://api.domo.com/v1/groups
https://api.domo.com/v1/pages/count
https://api.domo.com/v1/streams
https://api.domo.com/v1/users/count


Note

"Get count" services also make for a light-weight way of checking how your installation looks and how close it is to any off-line catalog you've created.

 

Alternative

Another idea is to offer a service that returns an array of resource IDs. For example:

 

https://api.domo.com/v1/users/ids

[8,27,83,111]

Then you extract the elements, have your count, and can take it from there.

 

Thanks.

1
1 votes

· Last Updated

Comments

  • Brilliant request! For all throttling and performance needs, the count of records returned by each of the Pages, Collections. DataSets API should be provided via API.

This discussion has been closed.