Shruthi R
Shruthi R

Reputation: 1

Unable to fetch promotion status from Jenkins API using curl – Getting HTTP Error 404

I am working on Jenkins promotions using the Promoted Builds Plugin. I want to check the status of my promotion level using the Jenkins API. However, I am unable to fetch the status and am getting a 404 error.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr><th>URI:</th><td>/job/test_job_2/46/promotion/promotionProcess/3.%20Approve%20to%20Prod%20environment/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/api/json</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
<tr><th>SERVLET:</th><td>Stapler</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.45.v20220203</a><hr/>
</body>
</html>

I've tried

curl -u your_username:your_token http://your_jenkins_url/job/test_job_2/46/promotion/promotionProcess/3.%20Approve%20to%20Prod%20environment/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/api/json

Can anyone help me with the correct curl command or guide me on how to properly fetch the promotion status for my Jenkins job?

Upvotes: 0

Views: 7

Answers (0)

Related Questions