Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add totalResults to List() #665

Open
danielscamacho opened this issue May 31, 2024 · 1 comment
Open

[FEATURE] Add totalResults to List() #665

danielscamacho opened this issue May 31, 2024 · 1 comment

Comments

@danielscamacho
Copy link

danielscamacho commented May 31, 2024

Problem Statement
List() just return the Objects but the API call gives totalResults and it is ignore and not capture in the sdk.
https://docs.databricks.com/api/azure/account/introduction

{ "totalResults": 10, "startIndex": 1, "itemsPerPage": 0, "Resources": [ { "displayName": "[email protected]", "...": "...", "userName": "[email protected]", "active": true } ] }

If you want to count the users you need to convert it to a list which takes lot of time if number of users is high

Proposed Solution
Add totalResults property for Users and other objects

@mgyucht
Copy link
Contributor

mgyucht commented Jun 7, 2024

Thanks for this feature request. The SCIM API is a bit unusual compared to other APIs that we have at Databricks in that it has this top-level metadata in list responses. We still need to think about how we can expose this information in the SDK. In the meantime, you should be able to use our internal ApiClient to make a request yourself:

w._api_client.do('GET', f'/api/2.0/accounts/{w._config.account_id}/scim/v2/Users')["totalResults"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants