Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AmyMisa
Frequent Visitor

JIRA API 400 Bad Request

Good morning/afternoon/evening 🙂 

 

I've been connecting to the JIRA API for some time now and it's been working fine up until now, where I am getting a bad request error. I have not changed anything in the code that makes the request to Jira. I have connected with the API key and checked that the projects, fields and custom fields all still exist in Jira, which they do. Can anyone identify what could be causing the error?

I have replaced the company name to keep it anonomised. Any help will be greatly appreciated!! 

 

let
BaseUrl = "https://ANONCOMPANY.atlassian.net/rest/api/3/search?jql=project in ('BIM', 'BCM')&fields=key,statuscategorychangedate,customfield_10076,resolution,lastViewed,priority,assignee,status,creator,reporter,issuetype,project,resolutiondate,created,updated,customfield_10091,customfield_10095,customfield_10129,summary,customfield_10085,customfield_10086,customfield_10087,customfield_10070,customfield_10078,customfield_10090,description,customfield_10132,customfield_10088",


JiraIDPerPage = 100,

GetJson = (Url) =>
let
RawData = Web.Contents(Url),
Json = Json.Document(RawData)
in Json,

GetJiraIDCount = () =>
let Url = BaseUrl & "&maxResults=0",
Json = GetJson(Url),
Count = Json[#"total"]
in Count,

GetPage = (Index) =>
let Skip = "&startAt=" & Text.From(Index * JiraIDPerPage),
Top = "&maxResults=" & Text.From(JiraIDPerPage),
Url = BaseUrl & Skip & Top,
Json = GetJson(Url),
Value = Json[#"issues"]
in Value,

JiraIDCount = List.Max({ JiraIDPerPage, GetJiraIDCount() }),
PageCount = Number.RoundUp(JiraIDCount / JiraIDPerPage),
PageIndices = { 0 .. PageCount - 1 },
Pages = List.Transform(PageIndices, each GetPage(_)),
JiraID = List.Union(Pages),

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @AmyMisa ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

amitchandak
Super User
Super User

@AmyMisa , I check can we use "in" in JIRA like above, I doubt that. Please review that

 

refer

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Is-it-possible-to-add-multiple-valu...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi - thanks! not sure why it would stop accepting 'in' as it was working up to this point in time. I have taken it out and tried = instead and nothing but no luck

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors