Manually formatting WebResponse to JSON in Automation

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Cloud のみ - この記事は、 クラウド プラットフォームのアトラシアン製品にのみ適用されます。

要約

When using the {{webResponse.body}} Smart Value from a web request in an Automation rule, Jira does not return it in JSON format - although the WebResponse value is in JSON when using the browser or a different tool.


To get the value in JSON, you can manually format it as shown below.

How To Replicate

For this scenario, we are using Jira REST API to get the values. This may vary depending on how your application is configured.

  1. Create an automation rule that sends a web request
  2. Include the response body in a comment action

     
  3. Observe that it's not in JSON format


回避策

To work around it, you will need to manually format it including the smart value for each field returned:



When this is done, the response body will be added in the correct JSON format.


(lightbulb)TIP: When working with web requests, you can also see some information regarding how to use the web response data here:

Relevant pages:


Last modified on Mar 4, 2024

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.