Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to paginate non-query syntax

Hello, 

 

I am wondering if it it possible to paginate no query get requests, as in:  /rest/align/api/2/Capabilities

I know for a query type request there is the maxresults and startat but that doesn't seem to work for the above.

 

Regards, 

Jason

2 answers

1 accepted

1 vote
Answer accepted
Kirill Duplyakin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2022

Hey Jason,

Check out this article: 10X: API 2.0 GET Usage and Filters 

The top and skip commands can be chained together to offer proper pagination (covered later in this article). Default order by is on ID, so the first 10 epics would mean IDs 1 - 10.

Top

Return the first 10 Epics

Syntax

/Epics?$top=<value>

cURL example

/Epics?$top=10
 

Skip

Skip the first 521 epics and return all after

Syntax

/Epics?$skip=<value>

cURL example

/Epics?$skip=521

Unfortunately, there's no total results indication in Jira Align API yet, it just returns a list of results (max 100) without other metadata.

 

You can find a few more useful articles here: Jira Align 10X: API 2.0 

Hope that helps :)

Thank you, it does help.  "skip" is basically the same as "startat" from what I am understanding.  I haven't fully tested but I think the main difference is that they would be off by 1 as in if you skip 100 you will start at 101 but if you startat 100 it will start at 100.

Like Kirill Duplyakin likes this
Kirill Duplyakin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2022

Yup, you got it 👍

Also, may be another topic but Jira API would show the total results in the JSON output that doesn't seem to be the case with Align?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events