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

422 Error with payload

sammyl
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!
October 29, 2024

I have the following payload below but it does not allow me to create an alert with the Jira Rest API

 

 

422 Client Error: Unprocessable Entity for url: https://api.atlassian.com/jsm/ops/integration/v2/alerts\", \"taskName\": \"Task-42\", \"payload\": {\"message\": \"Message\", \"description\": \"\", \"details\": {}, \"priority\": \"P4\", \"tags\": [], \"source\": \"CustomRiskRuleEngineAlert\", \"alias\": \"\"}

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2024

Hi @sammyl 

As you know the 422 error (Unprocessable Entity) means that the payload you are sending to the Jira REST API has problem(s), either because some required fields are missing or due to an invalid value. 

I see that you have already filled in the required message field. However, I recommend removing the optional parameters instead of leaving them as empty characters. Start by removing all optional fields to test if that creates the alert successfully, and then add the other fields back one at a time.

sammyl
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!
October 30, 2024

Turns out Jira gives u a 422 instead of a 401. It wasn't getting the correct authorization code from the header due to my helm files and was returning the 422. It should be corrected as I was looking in the wrong area

Suggest an answer

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

Atlassian Community Events