best-practices-badge icon indicating copy to clipboard operation
best-practices-badge copied to clipboard

enhance user API to query for info on many users at once

Open TonyLHansen opened this issue 1 week ago • 2 comments

my dashboard for ONAP uses the user API, for example https://www.bestpractices.dev/en/users/1597?format=json to look up information on the editors for each of our projects. This returns information such as:

{"id":1597,"name":"Tony Hansen","nickname":null,"uid":null,"provider":"local","created_at":"2017-08-16T13:25:18.530Z","updated_at":"2021-04-08T17:21:41.539Z","projects":[],"additional_rights":{"1718":["edit"],"1737":["edit"],"3777":["edit"]}}

Given the number of editors listed for each of these projects, this leads into many calls to the API and subsequently hits the rate limiting. It would be really good if there were an alternative way to request multiple users at once and receive back an array for the results, such as https://www.bestpractices.dev/en/users/1597,32875?format=json returning:

[
{"id":1597,"name":"Tony Hansen","nickname":null,"uid":null,"provider":"local","created_at":"2017-08-16T13:25:18.530Z","updated_at":"2021-04-08T17:21:41.539Z","projects":[],"additional_rights":{"1718":["edit"],"1737":["edit"],"3777":["edit"]}},
{"id":32875,"name":null,"nickname":"mrsjackson76","uid":"88408910","provider":"github","created_at":"2024-03-14T16:51:47.387Z","updated_at":"2024-03-14T16:51:47.387Z","projects":[1197,1441,1519,1540,1578,1579,1588,1591,1601,1602,1604,1608,161\
4,1629,1630,1631,1658,1702,1703,1706,1718,1720,1722,1737,1738,1742,1743,1751,1759,1771,1774,1799,1820,1821,2147,2192,2259,2303,2315,2316,3777,4398],"additional_rights":{}}
]

TonyLHansen avatar Jun 27 '24 14:06 TonyLHansen