This user guide only applies if your account and project is on our old platform, i.e. if your project's URL begins with https://xp-dev.com rather than https://<your-account>.xp-dev.com. If your account is on our new platform, you should be using this user guide instead.
Each Comment Object has the following attributes:
Attribute | Description |
---|---|
id | Unique Comment ID |
comment | The comment in Textile |
commentHtml | The Comment in HTML |
author | Username of this comment author |
type | The artifact type this comment relates to. Can be one of Wiki, Task, Story, Blog, ForumTopic, Bug. |
beanId | The artifact’s unique ID |
GET
request to https://xp-dev.com/api/v1/comments/wiki/<wiki-id>
:
curl https://xp-dev.com/api/v1/comments/wiki/3
Responses will be a list of Comment Objects:
{"response":[
{
"id":16,
"type":"Wiki",
"comment":"This is a wiki comment",
"beanId":3,
"author":"developer",
"htmlComment":"<p>This is a wiki comment</p>"
}
]}
GET
request to https://xp-dev.com/api/v1/comments/task/<task-id>
:
curl https://xp-dev.com/api/v1/comments/task/3
Responses will be a list of Comment Objects.
GET
request to https://xp-dev.com/api/v1/comments/story/<story-id>
:
curl https://xp-dev.com/api/v1/comments/story/3
Responses will be a list of Comment Objects.
GET
request to https://xp-dev.com/api/v1/comments/blog/<blog-id>
:
curl https://xp-dev.com/api/v1/comments/blog/3
Responses will be a list of Comment Objects.
GET
request to https://xp-dev.com/api/v1/comments/forumtopic/<forumtopic-id>
:
curl https://xp-dev.com/api/v1/comments/forumtopic/3
Responses will be a list of Comment Objects.
GET
request to https://xp-dev.com/api/v1/comments/bug/<bug-id>
:
curl https://xp-dev.com/api/v1/comments/bug/3
Responses will be a list of Comment Objects.
POST
request to https://xp-dev.com/api/v1/comments/
with the
following attributes:
Mandatory:
Example request:
curl -X POST -H 'Content-Type: application/json' -d '{"type":"Bug","beanId":5,"comment":"comment for a bug"}' https://xp-dev.com/api/v1/comments/
Responses will be in the form of a single Comment Object
GET
request to https://xp-dev.com/api/v1/comments/<comment-id>
. For
example:
curl https://xp-dev.com/api/v1/comments/6
Responses will be in the form of a single Comment Object
PUT
request to https://xp-dev.com/api/v1/comments/<comment-id>
with
the following attributes:
Mandatory:
Example request:
curl -X PUT -H 'Content-Type: application/json' -d '{"comment":"change a comment"}' https://xp-dev.com/api/v1/comments/6
Responses will be in the form of a single Comment Object
Feel free to contact us if you need any assistance.