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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,327
Community Members
 
Community Events
175
Community Groups

No matching report found

I am trying to use the bitbucket code report

using Gradle curl. 

 

task flushBucket() {
def process = [ 'bash', '-c', "curl --proxy 'http://localhost:29418' --request PUT \"http://api.bitbucket.org/2.0/repositories/\$BITBUCKET_REPO_OWNER/\$BITBUCKET_REPO_SLUG/commit/\$BITBUCKET_COMMIT/reports/mySystem-001/annotations/mySystem-annotation0055\" --header 'Content-Type: application/json' --data-raw '{\"title\": \"ttile\"}' " ].execute()
process.waitFor()
println "flushBucketflushBucket"
println process.err.text
println process.text
}

however, 

{"key": "report-service.general.bad-request", "message": "No matching report found ", "arguments": {}}

 

 

1 answer

0 votes
Caroline R Atlassian Team Feb 11, 2022

Hi, @Hudhayfah, thank you for reaching out to Atlassian Community.

In order to create or update a report, I would recommend you to follow the steps described in this link:

By checking the endpoint you have shared, it doesn’t look like you are using this endpoint to create/update a report, but the following endpoint to create or update an annotation in a report:

based on the URL in the question:

http://api.bitbucket.org/2.0/repositories/\$BITBUCKET_REPO_OWNER/\$BITBUCKET_REPO_SLUG/commit/\$BITBUCKET_COMMIT/reports/mySystem-001/annotations/mySystem-annotation0055

I understand you are trying to update or put an annotation in the report called mySystem-001 and if you get “No matching report found”, I would suggest you get all reports for that specific commit with
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-reports/#api-repositories-workspace-repo-slug-commit-commit-reports-get and see if there is a report with external_id mySystem-001 for that commit.

Please let me know how it goes and free to share any additional questions or concerns regarding this case.

Kind regards,
Caroline

script:
- >
curl --request PUT 'http://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO_OWNER/$BITBUCKET_REPO_SLUG/commit/$BITBUCKET_COMMIT/reports/mysystem-002' \
--header 'Content-Type:application/json' \
--data-raw '{ "title": "Security scan report",
"details": "This pull request introduces 10 new dependency vulnerabilities.",
"report_type": "SECURITY",
"reporter": "mySystem",
"link": "http://www.mysystem.com/reports/001",
"result": "FAILED" }'

no reports are generated 

Caroline R Atlassian Team Feb 28, 2022

Hi, @Hudhayfah

I saw that you created another question for this subject and Theodora has already provided you an answer, so you can refer to that for creating a report, and then let us know how it goes with creating a report and with the annotations. 

Looking forward to hearing from you. 

Kind regards,
Caroline 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events