{
  "opencollection": "1.0.0",
  "info": {
    "name": "InsightAppSec Accounts Comments API",
    "version": "v1"
  },
  "items": [
    {
      "info": {
        "name": "Comments",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Update comment visibility",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://[region].api.insight.rapid7.com/ias/v1/idr/v1/comments/:rrn/:visibility",
            "params": [
              {
                "name": "rrn",
                "value": "rrn:collaboration:us:01234567-89ab-cdef-0000-123123123123:comment:ABCDEF543210",
                "type": "path",
                "description": "The RRN of the comment."
              },
              {
                "name": "visibility",
                "value": "",
                "type": "path",
                "description": "The new visibility for the comment (case insensitive)."
              }
            ]
          },
          "docs": "An API to update visibility of a comment by using an RRN. This API returns the comment with the updated visibility ."
        },
        {
          "info": {
            "name": "List comments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://[region].api.insight.rapid7.com/ias/v1/idr/v1/comments",
            "params": [
              {
                "name": "target",
                "value": "rrn:investigation:us:01234567-89ab-cdef-0000-123123123123:investigation:ABCDEF543210",
                "type": "query",
                "description": "Return comments with this target."
              },
              {
                "name": "index",
                "value": "0",
                "type": "query",
                "description": "The optional 0, based index of the page to retrieve. Must be an integer greater than or equal to 0."
              },
              {
                "name": "size",
                "value": "20",
                "type": "query",
                "description": "The optional size of the page to retrieve. Must be an integer greater than 0 or less  or equal to 100."
              }
            ]
          },
          "docs": "Retrieves a page of comments matching the given request parameters. For example, this API allows you to list all comments on an investigation by passing an investigation's RRN as the target value."
        },
        {
          "info": {
            "name": "Create comment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://[region].api.insight.rapid7.com/ias/v1/idr/v1/comments",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "An API you can use to create comments for a particular target. The target determines where the comment will appear within InsightIDR. Only certain types of RRNs are permitted as targets, such as investigation RRNs."
        },
        {
          "info": {
            "name": "Get comment by rrn",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://[region].api.insight.rapid7.com/ias/v1/idr/v1/comments/:rrn",
            "params": [
              {
                "name": "rrn",
                "value": "rrn:collaboration:us:01234567-89ab-cdef-0000-123123123123:comment:ABCDEF543210",
                "type": "path",
                "description": "Return a comment with this rrn."
              }
            ]
          },
          "docs": "Retrieves a comment by its rrn."
        },
        {
          "info": {
            "name": "Delete a comment",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://[region].api.insight.rapid7.com/ias/v1/idr/v1/comments/:rrn",
            "params": [
              {
                "name": "rrn",
                "value": "rrn:collaboration:us:01234567-89ab-cdef-0000-123123123123:comment:ABCDEF543210",
                "type": "path",
                "description": "The RRN of the comment."
              }
            ]
          },
          "docs": "A delete API you can use to delete a comment by using an RRN. The RRN determines which comment will be deleted. Only the creator of a comment can delete it."
        }
      ]
    }
  ],
  "bundled": true
}