Rest API from Postman is not working in Confluence

お困りですか?

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

コミュニティに質問

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

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

    

要約


Confluence Data Center is unable to receive when calling REST API in the Postman client.

環境

  • Confluence Data Center 7.13.7


診断

  • Check if you have enabled rate limit in Confluence.
  • Check if you can call REST API using the curl command 

    curl -u <username>:<password> -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"new page",
    "space":{"key":"<space_key>"},"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation":
    "storage"}}}' https://BASEURL/rest/api/content/ | python -mjson.tool
  • Check Confluence access log if you see the PostmanRuntime/7.29.0 request like this (if not move to the solution): 

    [29/Jun/2022:10:43:10 +0200] xxxx http-nio-27164-exec-5 0:0:0:0:0:0:0:1 POST /c7164/rest/api/content/ HTTP/1.1 200 140ms 1691 - PostmanRuntime/7.29.0

原因


Postman Client is not accessible when calling to Confluence Proxy URL.

ソリューション

Bypass Load Balancer proxy and call the Rest API to the confluence node:

Add a new connector port 8092 to the <install-confluence-folder>/conf/server.xml on both nodes: 

<Connector port="8092" connectionTimeout="20000" maxThreads="200" minSpareThreads="10" 
    enableLookups="false" acceptCount="10" URIEncoding="UTF-8" />

The parameter above should be added under port 8090 connectors.

Restart both nodes and change the REST API URL to http://ip-address:8092/rest/api/content/ in Postman. Attempt to send the request to create a new page.

The IP address can be any node IP.



最終更新日 2022 年 7 月 7 日

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

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