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": "6580368828304953184",
    "body": "<p>This is the comment body for a feature.</p>",
    "created_at": "2018-07-20T18:31:49.773Z",
    "updated_at": "2018-07-20T18:31:49.773Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6580368828304953184",
    "resource": "http://account1.example.org/api/v1/comments/6580368828304953184",
    "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": "6580368829870824605",
    "body": "<p>This is the comment body for a master feature.</p>",
    "created_at": "2018-07-20T18:31:50.138Z",
    "updated_at": "2018-07-20T18:31:50.138Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6580368829870824605",
    "resource": "http://account1.example.org/api/v1/comments/6580368829870824605",
    "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": "6580368831013732689",
    "body": "<p>This is the comment body for a requirement.</p>",
    "created_at": "2018-07-20T18:31:50.404Z",
    "updated_at": "2018-07-20T18:31:50.404Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6580368831013732689",
    "resource": "http://account1.example.org/api/v1/comments/6580368831013732689",
    "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": "6580368833351729495",
    "body": "<p>This is the comment body for an idea.</p>",
    "created_at": "2018-07-20T18:31:50.943Z",
    "updated_at": "2018-07-20T18:31:50.943Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6580368833351729495",
    "resource": "http://account1.example.org/api/v1/comments/6580368833351729495",
    "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": "6580368834223256703",
    "body": "<p>This is the comment body for an initiative.</p>",
    "created_at": "2018-07-20T18:31:51.146Z",
    "updated_at": "2018-07-20T18:31:51.146Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z"
    },
    "attachments": [

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

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": "6580368835103333063",
    "body": "<p>This is the comment body for a goal.</p>",
    "created_at": "2018-07-20T18:31:51.356Z",
    "updated_at": "2018-07-20T18:31:51.356Z",
    "user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/comments/6580368835103333063",
    "resource": "http://account1.example.org/api/v1/comments/6580368835103333063",
    "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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.000Z"
      },
      "attachments": [
        {
          "id": "229957526",
          "download_url": "http://account1.lvh.me/attachments/229957526/token/d1ffd233f9e481c33f21e294c4d69c983e77eb291f5605b654bee683b066d035.download?size=original",
          "created_at": "2018-07-20T18:31:43.000Z",
          "updated_at": "2018-07-20T18:31:51.579Z",
          "file_size": 123,
          "content_type": "image/png",
          "file_name": "not-a-mockup.png"
        },
        {
          "id": "221084308",
          "download_url": "http://account1.lvh.me/attachments/221084308/token/366bb3c1eb691589628d107ef806f496f81a6d558e256ffffc4e68c36f2bb3bd.download?size=original",
          "created_at": "2018-07-20T18:31:43.000Z",
          "updated_at": "2018-07-20T18:31:51.596Z",
          "file_size": 123,
          "content_type": "image/png",
          "file_name": "Mockup.png"
        },
        {
          "id": "896530823",
          "download_url": "http://account1.lvh.me/attachments/896530823/token/6790f0d0bdc020e3ca7011ececbc31e1e8137e2d1629789260e47e1e0460cfaf.download?size=original",
          "created_at": "2018-07-20T18:31:43.000Z",
          "updated_at": "2018-07-20T18:31:51.623Z",
          "content_type": "application/pdf",
          "file_name": "google_doc.pdf",
          "file_size": null
        },
        {
          "id": "744925247",
          "download_url": "http://account1.lvh.me/attachments/744925247/token/84f7360a4482b6008b7c605ae8006a7e9a0106cc96f89e9a1abafd62973d9e41.download?size=original",
          "created_at": "2018-07-20T18:31:43.000Z",
          "updated_at": "2018-07-20T18:31:51.711Z",
          "file_size": 123,
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt"
        }
      ],
      "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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.000Z"
      },
      "attachments": [

      ],
      "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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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/423077122",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/initiatives/423077122"
      }
    },
    {
      "id": "821249787",
      "body": "Comment on goal",
      "created_at": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.000Z"
      },
      "attachments": [

      ],
      "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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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/423077122",
        "product_id": 131414752,
        "resource": "http://account1.example.org/api/v1/initiatives/423077122"
      }
    }
  ],
  "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": "2018-07-20T18:31:42.000Z",
      "updated_at": "2018-07-20T18:31:42.000Z",
      "user": {
        "id": "601067208",
        "name": "Jeremy Smith",
        "email": "jeremy.smith@account1.com",
        "created_at": "2018-07-20T18:31:42.000Z",
        "updated_at": "2018-07-20T18:31:42.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
  }
}

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