Add a comment
Owned by Peng Xiao
Sept 21, 2020
Loading data...
Comment
是一种content。在Confluence上创建一个 Comment
使用下面的API:
POST /wiki/rest/api/content
{
"type": "comment",
"space": {
"key": "ZEN"
},
"body": {
"storage": {
"representation": "storage",
"value": "A <ac:link> <ri:user ri:accountId=\"557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f\" ri:username=\"557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f\"/></ac:link> B"
}
},
"title": "Test comment",
"container": {
"id": 670892033,
"type" : "global"
}
}
Endpoint | /wiki/rest/api/content |
|
---|
Endpoint | /wiki/rest/api/content |
|
---|---|---|
type | comment |
|
space.key | ZEN |
|
body.storage.representation | storage |
|
body.storage.value | A <ac:link <ri:user ri:accountId="xxxxxx:xxxx-xxxx-xxx..." ri:username="xxxxxx:xxxx-xxxx-xxx..."/></ac:link> B |
|
title | Any string | title似乎没有用。不论是否提供title,respones中的title总是“Re: ZenUML”(ZenUML为page title)。 |
|
|
|
|
|
|
Response
{
"id": "830865477",
"type": "comment",
"status": "current",
"title": "Re: 产品运营",
"space": {
"id": 32987,
"key": "ZEN",
"name": "P&D Vision Products",
"type": "global",
"status": "current",
"_expandable": {
"settings": "/rest/api/space/ZEN/settings",
"metadata": "",
"operations": "",
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=ZEN",
"identifiers": "",
"permissions": "",
"icon": "",
"description": "",
"theme": "/rest/api/space/ZEN/theme",
"history": "",
"homepage": "/rest/api/content/252411915"
},
"_links": {
"webui": "/spaces/ZEN",
"self": "https://zenuml.atlassian.net/wiki/rest/api/space/ZEN"
}
},
"history": {
"latest": true,
"createdBy": {
"type": "known",
"accountId": "557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f",
"accountType": "atlassian",
"email": "support@zenuml.com",
"publicName": "Peng Xiao",
"profilePicture": {
"path": "/wiki/aa-avatar/557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f",
"width": 48,
"height": 48,
"isDefault": false
},
"displayName": "Peng Xiao",
"_expandable": {
"operations": "",
"personalSpace": ""
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/user?accountId=557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f"
}
},
"createdDate": "2020-09-20T08:07:49.507Z",
"_expandable": {
"lastUpdated": "",
"previousVersion": "",
"contributors": "",
"nextVersion": ""
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/content/830865477/history"
}
},
"version": {
"by": {
"type": "known",
"accountId": "557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f",
"accountType": "atlassian",
"email": "support@zenuml.com",
"publicName": "Peng Xiao",
"profilePicture": {
"path": "/wiki/aa-avatar/557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f",
"width": 48,
"height": 48,
"isDefault": false
},
"displayName": "Peng Xiao",
"_expandable": {
"operations": "",
"personalSpace": ""
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/user?accountId=557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f"
}
},
"when": "2020-09-20T08:07:49.507Z",
"friendlyWhen": "just a moment ago",
"message": "",
"number": 1,
"minorEdit": false,
"_expandable": {
"collaborators": "",
"content": "/rest/api/content/830865477"
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/content/830865477/version/1"
}
},
"ancestors": [],
"container": {
"id": "238026755",
"type": "page",
"status": "current",
"title": "产品运营",
"history": {
"latest": true,
"createdBy": {
"type": "known",
"accountId": "5cd2ccf7aee3080dc2f5ea4f",
"accountType": "atlassian",
"email": "",
"publicName": "mingwei.peng.zenuml (Unlicensed)",
"profilePicture": {
"path": "/wiki/aa-avatar/5cd2ccf7aee3080dc2f5ea4f",
"width": 48,
"height": 48,
"isDefault": false
},
"displayName": "Mingwei Peng (Unlicensed)",
"_expandable": {
"operations": "",
"personalSpace": ""
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/user?accountId=5cd2ccf7aee3080dc2f5ea4f"
}
},
"createdDate": "2019-07-05T01:00:40.842Z",
"_expandable": {
"lastUpdated": "",
"previousVersion": "",
"contributors": "",
"nextVersion": ""
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/content/238026755/history"
}
},
"version": {
"by": {
"type": "known",
"accountId": "557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f",
"accountType": "atlassian",
"email": "support@zenuml.com",
"publicName": "Peng Xiao",
"profilePicture": {
"path": "/wiki/aa-avatar/557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f",
"width": 48,
"height": 48,
"isDefault": false
},
"displayName": "Peng Xiao",
"_expandable": {
"operations": "",
"personalSpace": ""
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/user?accountId=557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f"
}
},
"when": "2019-12-02T11:05:45.463Z",
"friendlyWhen": "Dec 02, 2019",
"message": "",
"number": 4,
"minorEdit": false,
"syncRev": "0.dmDdZl61FouoFOvB0RbyRA.0",
"syncRevSource": "synchrony-ack",
"confRev": "confluence$content$238026755.37",
"_expandable": {
"collaborators": "",
"content": "/rest/api/content/238026755"
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/content/238026755/version/4"
}
},
"macroRenderedOutput": {},
"extensions": {
"position": 362
},
"_expandable": {
"childTypes": "",
"container": "/rest/api/space/ZEN",
"metadata": "",
"operations": "",
"children": "/rest/api/content/238026755/child",
"restrictions": "/rest/api/content/238026755/restriction/byOperation",
"ancestors": "",
"body": "",
"descendants": "/rest/api/content/238026755/descendant",
"space": "/rest/api/space/ZEN"
},
"_links": {
"self": "https://zenuml.atlassian.net/wiki/rest/api/content/238026755",
"tinyui": "/x/AwAwDg",
"editui": "/pages/resumedraft.action?draftId=238026755",
"webui": "/spaces/ZEN/pages/238026755"
}
},
"macroRenderedOutput": {},
"body": {
"storage": {
"value": "A <ac:link> <ri:user ri:account-id=\"557058:0a2e245b-f5cd-42f7-bf07-a53b8d17e94f\" /></ac:link> B",
"representation": "storage",
"embeddedContent": [],
"_expandable": {
"content": "/rest/api/content/830865477"
}
},
"_expandable": {
"editor": "",
"atlas_doc_format": "",
"view": "",
"export_view": "",
"styled_view": "",
"dynamic": "",
"editor2": "",
"anonymous_export_view": ""
}
},
"extensions": {
"location": "footer",
"_expandable": {
"resolution": ""
}
},
"_expandable": {
"childTypes": "",
"metadata": "",
"operations": "",
"children": "/rest/api/content/830865477/child",
"restrictions": "/rest/api/content/830865477/restriction/byOperation",
"descendants": "/rest/api/content/830865477/descendant"
},
"_links": {
"context": "/wiki",
"self": "https://zenuml.atlassian.net/wiki/rest/api/content/830865477",
"collection": "/rest/api/content",
"webui": "/spaces/ZEN/pages/238026755?focusedCommentId=830865477#comment-830865477",
"base": "https://zenuml.atlassian.net/wiki"
}
}
id
可以用来locate/lookup comment。
How to get all users?