AgileZen API Documentation

Comments

Comment Endpoints

List comments within a story

GET https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/comments

Retrieves the list of comments from the specified story.

Requires Read access on the project.
Supports: Enrichments, Filters, Pagination

{
  "page": 1,
  "pageSize": 100,
  "totalPages": 1,
  "totalItems": 1,
  "items": [
    {
      "id": 1,
      "text": "No way we can build it in 2 weeks.",
      "createTime": "2011-02-17T20:01:01",
      "author": {
        "id": 1,
        "name": "Gob Bluth",
        "userName": "gob",
        "email": "Gob@bluth.com"
      }
    }
  ]
}
<?xml version="1.0" encoding="utf-8"?>
<comments>
  <items>
    <comment>
      <author>
        <email>Gob@bluth.com</email>
        <id>1</id>
        <name>Gob Bluth</name>
        <userName>gob</userName>
      </author>
      <createTime>2011-02-17T20:01:01</createTime>
      <id>1</id>
      <text>No way we can build it in 2 weeks.</text>
    </comment>
  </items>
  <page>1</page>
  <pageSize>100</pageSize>
  <totalItems>1</totalItems>
  <totalPages>1</totalPages>
</comments>

Create a new comment

POST https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/comments

Creates a new comment in the specified story.

Requires ReadWrite access on the project.
Supports: Enrichments

The request data should be an object with the following properties. You don’t need to specify all of the properties – any omitted ones will be given the specified default value.

PropertyTypeRequiredDefaultDescription
textstringyesn/aThe text of the comment.

On success, returns the created comment.

{
  "id": 1,
  "text": "No way we can build it in 2 weeks.",
  "createTime": "2011-02-17T20:01:01",
  "author": {
    "id": 1,
    "name": "Gob Bluth",
    "userName": "gob",
    "email": "Gob@bluth.com"
  }
}
<?xml version="1.0" encoding="utf-8"?>
<comment>
  <author>
    <email>Gob@bluth.com</email>
    <id>1</id>
    <name>Gob Bluth</name>
    <userName>gob</userName>
  </author>
  <createTime>2011-02-17T20:01:01</createTime>
  <id>1</id>
  <text>No way we can build it in 2 weeks.</text>
</comment>

Get a comment

GET https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/comments/{commentid}

Returns a single comment.

Requires Read access on the project.
Supports: Enrichments

{
  "id": 1,
  "text": "No way we can build it in 2 weeks.",
  "createTime": "2011-02-17T20:01:01",
  "author": {
    "id": 1,
    "name": "Gob Bluth",
    "userName": "gob",
    "email": "Gob@bluth.com"
  }
}
<?xml version="1.0" encoding="utf-8"?>
<comment>
  <author>
    <email>Gob@bluth.com</email>
    <id>1</id>
    <name>Gob Bluth</name>
    <userName>gob</userName>
  </author>
  <createTime>2011-02-17T20:01:01</createTime>
  <id>1</id>
  <text>No way we can build it in 2 weeks.</text>
</comment>

Update a comment

PUT https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/comments/{commentid}

Updates the text on a certain comment.

Requires ReadWrite access on the project, and authorship of the comment being edited.
Supports: Enrichments

The request data should be an object with text property.

PropertyTypeDescription
textstringThe text of the comment

On success, returns the updated comment.

{
  "id": 1,
  "text": "No way we can build it in 2 weeks.",
  "createTime": "2011-02-17T20:01:01",
  "author": {
    "id": 1,
    "name": "Gob Bluth",
    "userName": "gob",
    "email": "Gob@bluth.com"
  }
}
<?xml version="1.0" encoding="utf-8"?>
<comment>
  <author>
    <email>Gob@bluth.com</email>
    <id>1</id>
    <name>Gob Bluth</name>
    <userName>gob</userName>
  </author>
  <createTime>2011-02-17T20:01:01</createTime>
  <id>1</id>
  <text>No way we can build it in 2 weeks.</text>
</comment>

Delete a comment

DELETE https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/comments/{commentid}

Deletes the specified comment.

Requires ReadWrite access on the project.

On success, returns an empty result with a 200 status code.

Reference Syntax

When sending data to an endpoint, you can refer to comments in one of two ways:

  1. You can specify the comment’s numeric identifier.
  2. You can specify an object representation of the comment. The object that you send must have an id property with the comment’s numeric identifier.

If the endpoint expects more than one comment, you can send either an array of integers or an array of objects. We accept these two representations to allow you to send back the actual models that AgileZen sends to you — or if you’d rather not bother, you can just send the identifier for simplicity’s sake.

Filters

There are currently no filters available for comments.

Enrichments

There are currently no enrichments available for comments.