Comments API


Comments can be added to and listed as a sub-resource on any resource that supports them. These resources support comments:

They can be listed product-wide, or retrieved from anywhere in the system using the root comments resource.

POST /api/v1/features/:feature_id/comments

Create a comment for a feature

Parameters

Name Description
feature_id * Numeric ID or key of the feature the comment should be created for

POST /api/v1/features/1007868956/comments

Example CURL command

curl "https://account1.aha.io/api/v1/features/1007868956/comments" -d '{"comment":{"body":"\u003cp\u003eThis is the comment body for a feature.\u003c/p\u003e"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>This is the comment body for a feature.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "6654698163583202144",
    "body": "<p>This is the comment body for a feature.</p>",
    "created_at": "2019-02-06T01:47:36.746Z",
    "updated_at": "2019-02-06T01:47:36.746Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6654698163583202144",
    "resource": "http://account1.example.org/api/v1/comments/6654698163583202144",
    "commentable": {
      "type": "Feature",
      "id": "1007868956",
      "url": "http://account1.example.org/features/PRJ1-1",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
    }
  }
}

POST /api/v1/master_features/:master_feature_id/comments

Create a comment for a master feature

Parameters

Name Description
master_feature_id * Numeric ID or key of the master feature feature the comment should be created for

POST /api/v1/master_features/999605892/comments

Example CURL command

curl "https://account1.aha.io/api/v1/master_features/999605892/comments" -d '{"comment":{"body":"\u003cp\u003eThis is the comment body for a master feature.\u003c/p\u003e"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>This is the comment body for a master feature.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "6654698164382599770",
    "body": "<p>This is the comment body for a master feature.</p>",
    "created_at": "2019-02-06T01:47:36.934Z",
    "updated_at": "2019-02-06T01:47:36.934Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6654698164382599770",
    "resource": "http://account1.example.org/api/v1/comments/6654698164382599770",
    "commentable": {
      "type": "Epic",
      "id": "999605892",
      "url": "http://account1.example.org/epics/PRJ1-E-1",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/epics/PRJ1-E-1"
    }
  }
}

POST /api/v1/requirements/:requirement_id/comments

Create a comment for a requirement

Parameters

Name Description
requirement_id * Numeric ID or key of the requirement the comment should be created for

POST /api/v1/requirements/483368544/comments

Example CURL command

curl "https://account1.aha.io/api/v1/requirements/483368544/comments" -d '{"comment":{"body":"\u003cp\u003eThis is the comment body for a requirement.\u003c/p\u003e"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>This is the comment body for a requirement.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "6654698164930854401",
    "body": "<p>This is the comment body for a requirement.</p>",
    "created_at": "2019-02-06T01:47:37.063Z",
    "updated_at": "2019-02-06T01:47:37.063Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6654698164930854401",
    "resource": "http://account1.example.org/api/v1/comments/6654698164930854401",
    "commentable": {
      "type": "Requirement",
      "id": "483368544",
      "url": "http://account1.example.org/requirements/PRJ1-1-1",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1"
    }
  }
}

POST /api/v1/ideas/:idea_id/comments

Create a private comment for an idea

Parameters

Name Description
idea_id * Numeric ID or key of the idea the comment should be created for

POST /api/v1/ideas/58056975/comments

Example CURL command

curl "https://account1.aha.io/api/v1/ideas/58056975/comments" -d '{"comment":{"body":"\u003cp\u003eThis is the comment body for an idea.\u003c/p\u003e"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>This is the comment body for an idea.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "6654698165954812147",
    "body": "<p>This is the comment body for an idea.</p>",
    "created_at": "2019-02-06T01:47:37.299Z",
    "updated_at": "2019-02-06T01:47:37.299Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6654698165954812147",
    "resource": "http://account1.example.org/api/v1/comments/6654698165954812147",
    "commentable": {
      "type": "Ideas::Idea",
      "id": "58056975",
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/ideas/ideas/PRJ1-I-1"
    }
  }
}

POST /api/v1/initiatives/:initiative_id/comments

Create a comment for an initiative

Parameters

Name Description
initiative_id * Numeric ID or key of the initiative the comment should be created for

POST /api/v1/initiatives/423077122/comments

Example CURL command

curl "https://account1.aha.io/api/v1/initiatives/423077122/comments" -d '{"comment":{"body":"\u003cp\u003eThis is the comment body for an initiative.\u003c/p\u003e"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>This is the comment body for an initiative.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "6654698166340482663",
    "body": "<p>This is the comment body for an initiative.</p>",
    "created_at": "2019-02-06T01:47:37.390Z",
    "updated_at": "2019-02-06T01:47:37.390Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6654698166340482663",
    "resource": "http://account1.example.org/api/v1/comments/6654698166340482663",
    "commentable": {
      "type": "Initiative",
      "id": "423077122",
      "url": "http://account1.example.org/initiatives/PRJ1-S-1",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/initiatives/PRJ1-S-1"
    }
  }
}

POST /api/v1/goals/:goal_id/comments

Create a comment for a goal

Parameters

Name Description
goal_id * Numeric ID or key of the goal the comment should be created for

POST /api/v1/goals/602095703/comments

Example CURL command

curl "https://account1.aha.io/api/v1/goals/602095703/comments" -d '{"comment":{"body":"\u003cp\u003eThis is the comment body for a goal.\u003c/p\u003e"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>This is the comment body for a goal.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "6654698166761290427",
    "body": "<p>This is the comment body for a goal.</p>",
    "created_at": "2019-02-06T01:47:37.488Z",
    "updated_at": "2019-02-06T01:47:37.488Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6654698166761290427",
    "resource": "http://account1.example.org/api/v1/comments/6654698166761290427",
    "commentable": {
      "type": "StrategicImperative",
      "id": "602095703",
      "url": "http://account1.example.org/strategic_imperatives/602095703",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/goals/602095703"
    }
  }
}

GET /api/v1/products/:project_id/comments

Get all comments on a product

Parameters

Name Description
project_id * Numeric ID of the product to get comments for

GET /api/v1/products/131414752/comments

Example CURL command

curl -g "https://account1.aha.io/api/v1/products/131414752/comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comments": [
    {
      "id": "55160124",
      "body": "Comment on project",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/55160124",
      "resource": "http://account1.example.org/api/v1/comments/55160124",
      "commentable": {
        "type": "Task",
        "id": "748715293",
        "url": "http://account1.example.org/tasks/748715293",
        "product_id": null,
        "resource": "http://account1.example.org/api/v1/tasks/748715293"
      }
    },
    {
      "id": "933135074",
      "body": "Comment on project",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [
        {
          "id": "229957526",
          "download_url": "http://account1.lvh.me/attachments/229957526/token/aaabbbccc111224.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:32.000Z",
          "content_type": "image/png",
          "file_name": "not-a-mockup.png",
          "file_size": 123
        },
        {
          "id": "221084308",
          "download_url": "http://account1.lvh.me/attachments/221084308/token/eb087d5dcdfc26855c7842836c11fae8eac5249a5acb998f6cfe4cbb55294c6b.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.599Z",
          "content_type": "image/png",
          "file_name": "Mockup.png",
          "file_size": 123
        },
        {
          "id": "109125418",
          "download_url": "http://account1.lvh.me/attachments/109125418/token/08fba901fcac2b0f81f176250c8780644a60822349780a7642f1683411addd9c.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.622Z",
          "content_type": "application/pdf",
          "file_name": "google_doc.pdf",
          "file_size": 67794
        },
        {
          "id": "793976649",
          "download_url": "http://account1.lvh.me/attachments/793976649/token/eae7be5bbf382cf5a8e0ccba5ab9dd7852deb5e51ad8e047c29188f89b0557bd.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.636Z",
          "content_type": "application/pdf",
          "file_name": "box_doc.pdf",
          "file_size": 677794
        },
        {
          "id": "1005425561",
          "download_url": "http://account1.lvh.me/attachments/1005425561/token/85aa8d3510d234606fef3b2728bfd486dc3f1eb7b8022444b176684094c5104d.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.648Z",
          "content_type": "application/pdf",
          "file_name": "dropbox_doc.pdf",
          "file_size": 677794
        },
        {
          "id": "896530823",
          "download_url": "http://account1.lvh.me/attachments/896530823/token/aaabbbccc111223.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:32.000Z",
          "content_type": "application/pdf",
          "file_name": "google_doc.pdf",
          "file_size": null
        },
        {
          "id": "744925247",
          "download_url": "http://account1.lvh.me/attachments/744925247/token/d0ddbf556d19d42908ed19c76f89441923ef9a37b980f03ce6b62cd418513efe.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.684Z",
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt",
          "file_size": 123
        }
      ],
      "url": "http://account1.example.org/comments/933135074",
      "resource": "http://account1.example.org/api/v1/comments/933135074",
      "commentable": {
        "type": "Project",
        "id": "131414752",
        "url": "http://account1.example.org/projects/PRJ1",
        "resource": "http://account1.example.org/api/v1/products/PRJ1"
      }
    },
    {
      "id": "781701978",
      "body": "Comment on feature",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [
        {
          "id": "180276963",
          "download_url": "http://account1.lvh.me/attachments/180276963/token/2c9119fe092c1e816dd38d6ea55227469142a88d4cb54d0f7ff436849ded632c.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.704Z",
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt",
          "file_size": 123
        },
        {
          "id": "822785180",
          "download_url": "http://account1.lvh.me/attachments/822785180/token/0d28432e3f8fc4095abce3884303ed15866170a855eb510bda467a4900a42871.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:37.817Z",
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt",
          "file_size": 123
        }
      ],
      "url": "http://account1.example.org/comments/781701978",
      "resource": "http://account1.example.org/api/v1/comments/781701978",
      "commentable": {
        "type": "Feature",
        "id": "1007868956",
        "url": "http://account1.example.org/features/PRJ1-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    },
    {
      "id": "428925905",
      "body": "Comment on release",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/428925905",
      "resource": "http://account1.example.org/api/v1/comments/428925905",
      "commentable": {
        "type": "Release",
        "id": "278327321",
        "url": "http://account1.example.org/releases/PRJ1-R-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1"
      }
    },
    {
      "id": "133461614",
      "body": "Comment on initiative",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/133461614",
      "resource": "http://account1.example.org/api/v1/comments/133461614",
      "commentable": {
        "type": "Initiative",
        "id": "423077122",
        "url": "http://account1.example.org/initiatives/PRJ1-S-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/initiatives/PRJ1-S-1"
      }
    },
    {
      "id": "821249787",
      "body": "Comment on goal",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/821249787",
      "resource": "http://account1.example.org/api/v1/comments/821249787",
      "commentable": {
        "type": "StrategicImperative",
        "id": "602095703",
        "url": "http://account1.example.org/strategic_imperatives/602095703",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/goals/602095703"
      }
    },
    {
      "id": "110125740",
      "body": "Comment on competitor 1",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/110125740",
      "resource": "http://account1.example.org/api/v1/comments/110125740",
      "commentable": {
        "type": "Competitor",
        "id": "892399625",
        "url": "http://account1.example.org/competitors/892399625",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/competitors/892399625"
      }
    },
    {
      "id": "340318108",
      "body": "This feature is integrated",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/340318108",
      "resource": "http://account1.example.org/api/v1/comments/340318108",
      "commentable": {
        "type": "Feature",
        "id": "303873333",
        "url": "http://account1.example.org/features/PRJ1-3",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/features/PRJ1-3"
      }
    },
    {
      "id": "971503243",
      "body": "This is a requirement comment",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/971503243",
      "resource": "http://account1.example.org/api/v1/comments/971503243",
      "commentable": {
        "type": "Requirement",
        "id": "483368544",
        "url": "http://account1.example.org/requirements/PRJ1-1-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1"
      }
    }
  ],
  "pagination": {
    "total_records": 9,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/features/:feature_id/comments

Get all comments on a feature

Parameters

Name Description
feature_id * Numeric ID of the feature to get comments for

GET /api/v1/features/1007868956/comments

Example CURL command

curl -g "https://account1.aha.io/api/v1/features/1007868956/comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comments": [
    {
      "id": "781701978",
      "body": "Comment on feature",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [
        {
          "id": "180276963",
          "download_url": "http://account1.lvh.me/attachments/180276963/token/acdd4b793cbc56c14a7b4bc991ee21790eb946fa3b96ad9c225bdf95d3cccc74.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:38.038Z",
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt",
          "file_size": 123
        },
        {
          "id": "822785180",
          "download_url": "http://account1.lvh.me/attachments/822785180/token/1f96b872901e4fedad23988d5fc9b580d2602b5862e4507ffe79949cd2b014c4.download?size=original",
          "created_at": "2019-02-06T01:47:32.000Z",
          "updated_at": "2019-02-06T01:47:38.087Z",
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt",
          "file_size": 123
        }
      ],
      "url": "http://account1.example.org/comments/781701978",
      "resource": "http://account1.example.org/api/v1/comments/781701978",
      "commentable": {
        "type": "Feature",
        "id": "1007868956",
        "url": "http://account1.example.org/features/PRJ1-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/requirements/:requirement_id/comments

Get all comments on a requirement

Parameters

Name Description
requirement_id * Numeric ID of the requirement to get comments for

GET /api/v1/requirements/483368544/comments

Example CURL command

curl -g "https://account1.aha.io/api/v1/requirements/483368544/comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comments": [
    {
      "id": "971503243",
      "body": "This is a requirement comment",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/971503243",
      "resource": "http://account1.example.org/api/v1/comments/971503243",
      "commentable": {
        "type": "Requirement",
        "id": "483368544",
        "url": "http://account1.example.org/requirements/PRJ1-1-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/ideas/:idea_id/comments

Get all comments on an idea

Parameters

Name Description
idea_id * Numeric ID of the idea to get comments for

GET /api/v1/ideas/58056975/comments

Example CURL command

curl -g "https://account1.aha.io/api/v1/ideas/58056975/comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comments": [

  ],
  "pagination": {
    "total_records": 0,
    "total_pages": 0,
    "current_page": 1
  }
}

GET /api/v1/initiatives/:initiative_id/comments

Get all comments on an initiative

Parameters

Name Description
initiative_id * Numeric ID of the initiative to get comments for

GET /api/v1/initiatives/423077122/comments

Example CURL command

curl -g "https://account1.aha.io/api/v1/initiatives/423077122/comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comments": [
    {
      "id": "133461614",
      "body": "Comment on initiative",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/133461614",
      "resource": "http://account1.example.org/api/v1/comments/133461614",
      "commentable": {
        "type": "Initiative",
        "id": "423077122",
        "url": "http://account1.example.org/initiatives/PRJ1-S-1",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/initiatives/PRJ1-S-1"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/goals/:goal_id/comments

Get all comments on a goal

Parameters

Name Description
goal_id * Numeric ID of the goal to get comments for

GET /api/v1/goals/602095703/comments

Example CURL command

curl -g "https://account1.aha.io/api/v1/goals/602095703/comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comments": [
    {
      "id": "821249787",
      "body": "Comment on goal",
      "created_at": "2019-02-06T01:47:32.000Z",
      "updated_at": "2019-02-06T01:47:32.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2019-02-06T01:47:31.000Z",
        "updated_at": "2019-02-06T01:47:31.000Z"
      },
      "attachments": [

      ],
      "url": "http://account1.example.org/comments/821249787",
      "resource": "http://account1.example.org/api/v1/comments/821249787",
      "commentable": {
        "type": "StrategicImperative",
        "id": "602095703",
        "url": "http://account1.example.org/strategic_imperatives/602095703",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/goals/602095703"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

PUT /api/v1/comments/:id

Update a comment

Parameters

Name Description
id * Numeric ID, or key of the comment to be edited

PUT /api/v1/comments/781701978

Example CURL command

curl "https://account1.aha.io/api/v1/comments/781701978" -d '{"comment":{"body":"\u003cp\u003eUpdated comment body.\u003c/p\u003e"}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "comment": {
    "body": "<p>Updated comment body.</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "comment": {
    "id": "781701978",
    "body": "<p>Updated comment body.</p>",
    "created_at": "2019-02-06T01:47:32.000Z",
    "updated_at": "2019-02-06T01:47:38.644Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2019-02-06T01:47:31.000Z",
      "updated_at": "2019-02-06T01:47:31.000Z"
    },
    "attachments": [
      {
        "id": "180276963",
        "download_url": "http://account1.lvh.me/attachments/180276963/token/ef715b6c8842561fe51744cac76327554ff762643d5a1e2bc4eeefe43877a36c.download?size=original",
        "created_at": "2019-02-06T01:47:32.000Z",
        "updated_at": "2019-02-06T01:47:38.681Z",
        "content_type": "text/plain",
        "file_name": "uploaded_file_name.txt",
        "file_size": 123
      },
      {
        "id": "822785180",
        "download_url": "http://account1.lvh.me/attachments/822785180/token/ccebbe057c7d775a8ddececc70a26c779057ce29a7763f8706c15dd13c37526d.download?size=original",
        "created_at": "2019-02-06T01:47:32.000Z",
        "updated_at": "2019-02-06T01:47:38.720Z",
        "content_type": "text/plain",
        "file_name": "uploaded_file_name.txt",
        "file_size": 123
      }
    ],
    "url": "http://account1.example.org/comments/781701978",
    "resource": "http://account1.example.org/api/v1/comments/781701978",
    "commentable": {
      "type": "Feature",
      "id": "1007868956",
      "url": "http://account1.example.org/features/PRJ1-1",
      "product_id": 131414752,
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
    }
  }
}

DELETE /api/v1/comments/:id

Delete comment

Parameters

Name Description
id * Numeric ID of the comment to be deleted

DELETE /api/v1/comments/55160124

Example CURL command

curl "https://account1.aha.io/api/v1/comments/55160124" -d '' -X DELETE \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 204 No Content
  

Overview

API Resources