Data pipeline export request fails with XSRF check failed error

お困りですか?

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

コミュニティに質問

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

問題

When attempting to export data using the data pipeline API in Confluence via the command line, the export fails with the following error in the console:

XSRF check failed

原因

The Confluence REST API is protected from Cross Site Request Forgery (XSRF/CSRF) attacks for security reasons. 

ソリューション

To call protected APIs from your command line or external systems you can add the X-Atlassian-Token header to each request, and set the value to no-check. Adding this header to a request bypasses the server-side XSRF check and allows the request to be fulfilled. This is only available for requests made by command line tools or external systems, not browser requests. 

Here's an example export request with the X-Atlassian-Token header. We used cURL and a personal access token for this request.

curl -H "Authorization:Bearer <personal-access-token>" -H "X-Atlassian-Token: no-check" 
-X POST http://<base-url>/rest/datapipeline/latest/export

This issue only affects Confluence. 

説明Data pipeline export request fails with XSRF check failed error
製品Confluence
Last modified on Mar 5, 2021

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

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