Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira cloud C# and Json

Kelly DeGroot
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 13, 2021

Im trying to get issues from the api using c# pulling about 15 fields

when I set the maxResults at 15 the code works and I can output the json from streamreader however when I set the maxresults to 20 nothing happens and no errors any Ideas on limitations or why this would happen... Ive also tried with just one field when I do this I get 100 records but if I add in another field no results no error...

string m_BaseUrl = "https://xxx-xxx.atlassian.net/rest/api/2/search?jql=";
String endurl = "&startAt=0&maxResults=20&fields=one,two,three,four,five,set

1 answer

0 votes
Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 14, 2021

Hi @Kelly DeGroot 

That's really strange because I've been using C# and the REST API for years without an issue, returning 100 records with a lot more than 15 fields each. The number of fields should have nothing to do with what's returned, although it's sounding as if the streamreader you're using is somehow size-limited. A couple of questions / suggestions :

  1. Has this ever worked successfully before i.e. has something changed and it's now having an issue?
  2. What happens if you don't pass in maxResults and don't pass in which fields? i.e. leave your variable endurl shown above blank
  3. Try the version 3 API, so it is /rest/api/3/search
  4. Post the code here where you're actually calling the API and returning the JSON, we may be able to spot an issue

Once we're through these, there may be further ideas that get sparked.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events