4

REST API を使用して、コンフルエンス内のページにコメントを自動的に追加しようとしています。

Postman を使用してテストしています。この URL を指しています: https://###########.atlassian.net/wiki/rest/api/content/

有効なヘッダーを使用して、この json を投稿します。

{  
    "type":"comment",
    "container":"72025106",
    "body":{  
        "storage":{  
            "value":"auto comment 1",
            "representation":"storage"
        }
    }
}

すると、このエラーが返されます:

{
    "statusCode": 500,
    "message": "java.lang.IllegalStateException: Must provide id and type for Content"
}
4

1 に答える 1

6

これはうまくいくはずです:

{"type":"comment",
   "container":{
       "id":"[PARENT_ID]",
       "type":"page",
       "status":"current"
   },
   "body":{
      "storage":{
         "value":"[COMMENT_BODY]",
         "representation":"storage"
      }
   }
}
于 2015-05-21T06:40:43.270 に答える