Comments (4)
@LalitTurbot If this table has a pagination issue, do others have the same issue as well?
from steampipe-plugin-jira.
@cbruno10 will verify other tables too for paging while working on fix for it
from steampipe-plugin-jira.
@LalitTurbot Thanks for looking into this issue earlier today. Based on our initial findings, there appear to be 2 blockers:
- The users API doesn't return filtering fields in its responses, which makes implementing pagination client side difficult
- When listing users with the
maxResults
(default 50) request parameter, the maximum value for that parameter is 1000
For the first issue, it seems like pagination isn't available for users in the Jira API. For instance, when attempting to get users from the API using curl
:
curl --request GET \
--url 'https://myjira-jira.atlassian.net/rest/api/2/users?startAt=0&maxResults=2' \
--user '[email protected]:...' \
--header 'Accept: application/json'
The API returns the response:
[
{
"self": "https://myjira-jira.atlassian.net/rest/api/2/user?accountId=...",
"displayName": "Lalit Bhardwaj",
...
},
{
"self": "https://myjira-jira.atlassian.net/rest/api/2/user?accountId=...",
"displayName": "Automation for Jira",
...
}
]
This response is different from other APIs' responses in that it doesn't contain expected fields like startAt
, total
, or next
, e.g.,
curl --request GET \
--url 'https://myjira-jira.atlassian.net/rest/api/2/dashboard?startAt=0&maxResults=2' \
--user '[email protected]:...' \
--header 'Accept: application/json'
{
"startAt": 0,
"maxResults": 2,
"total": 3,
"next": "https://myjira-jira.atlassian.net/rest/api/2/dashboard?maxResults=2&startAt=2",
"dashboards": [
{
"id": "10000",
"isFavourite": false,
"name": "Default dashboard",
...
},
{
"id": "10001",
"isFavourite": true,
"name": "Lalit",
...
}
]
}
These are the fields that allow us to implement paging client side, but unfortunately missing when listing users. This was mentioned in JRASERVER-65089.
For the second issue, we can use the maxResults
request parameter, but that appears to be capped at 1000 users, so only 1000 users max would be returned. We're still currently doing some testing from our side, but if this is the case, then it could require another workaround from our side to ensure that we can retrieve all of the users.
from steampipe-plugin-jira.
For the record, I'm on Jira Cloud (and that JRASERVER-65089 bug is for Jira Server). Probably not helpful, but thought I'd mention it.
from steampipe-plugin-jira.
Related Issues (20)
- Add table jira_user_settings_details from profile & visibility. HOT 4
- Add table jira_confluence_space HOT 1
- Add table jira_settings_system to fetch the settings info. HOT 3
- Add table jira_apps_managed apps HOT 2
- v0.0.2
- Update steampipe-plugin-sdk to v1.3.1
- Add Resolution details call in table jira_issue HOT 1
- Add table jira_site_access to fetch the site access info HOT 3
- Update steampipe-plugin-sdk to v1.6.1
- Querying issues loads all issues HOT 2
- Improve the help message if `base_url`, or any other key argument is not specified?
- Adding "resolved" field into jira_issue table HOT 1
- select * from jira_backlog_issue HOT 15
- Allow authentication to on-premise jira using personal access token HOT 4
- Inconsistent Behavior When Querying by Epic Key HOT 4
- user_table not returning all results HOT 7
- Connection configuration is not available through env variables HOT 4
- Strange result sets using epic_key in jira_issue table HOT 3
- CSV Output Column\Row Truncation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steampipe-plugin-jira.