POST api/v2.0/ResourceLibrary/AddComment?documentKey={documentKey}

Add a new Comment to a Document.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
documentKey

Key of the Document being commented on.

globally unique identifier

Required

Body Parameters

CommentRequest
NameDescriptionTypeAdditional information
CommentBody

string

None.

Request Formats

application/json, text/json

Sample:
{
  "CommentBody": "sample string 1"
}

application/xml, text/xml

Sample:
<CommentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request">
  <CommentBody>sample string 1</CommentBody>
</CommentRequest>

Response Information

Resource Description

True if successful.

Comment
NameDescriptionTypeAdditional information
CommentKey

The unique identifier for the comment

globally unique identifier

None.

CommentBody

The text body of the comment

string

None.

CommentAuthor

Metadata pertaining to the user who created the comment

ContactConcise

None.

IsOfficial

A single comment for an item can be marked as the official comment, and is generally displayed as the top comment/pinned.

boolean

None.

ItemKey

The unique identifier for the comment's parent content item

globally unique identifier

None.

CreatedOn

The date that the comment was created

date

None.

UpdatedOn

The date that the comment was last updated

date

None.

Response Formats

application/json, text/json

Sample:
{
  "CommentKey": "7b8f0c58-4a3f-44e4-ad55-83b939cda0ab",
  "CommentBody": "sample string 2",
  "CommentAuthor": {
    "LinkToProfile": "sample string 1",
    "PictureUrl": "sample string 2",
    "ContactKey": "735ab548-673f-4396-a9b3-d86326d4df8d",
    "FirstName": "sample string 4",
    "LastName": "sample string 5",
    "DisplayName": "sample string 6",
    "EmailAddress": "sample string 7",
    "ContactStatusCode": "sample string 8",
    "PrefixCode": "sample string 9",
    "UpdatedOn": "2024-03-28T13:07:03.1294441Z",
    "UpdatedByContactKey": "59a0cd31-9397-439f-bb8f-0efbf27a2387",
    "CompanyName": "sample string 12",
    "CompanyTitle": "sample string 13",
    "SuffixCode": "sample string 14",
    "Designation": "sample string 15",
    "LegacyContactKey": "sample string 16",
    "InformalName": "sample string 17",
    "MiddleName": "sample string 18",
    "IsCompany": true,
    "CompanyLegacyContactKey": "sample string 20",
    "AMSDirectoryOptOut": true,
    "HLDirectoryOptOut": true,
    "HLContactMeOptOut": true,
    "LargePictureUrl": "sample string 24",
    "AgreedToTermsDateTime": "2024-03-28T13:07:03.1294441Z"
  },
  "IsOfficial": true,
  "ItemKey": "d480422f-959c-4cfc-9690-6ed80f295baa",
  "CreatedOn": "2024-03-28T13:07:03.1294441Z",
  "UpdatedOn": "2024-03-28T13:07:03.1294441Z"
}

application/xml, text/xml

Sample:
<Comment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise">
  <CommentAuthor>
    <AMSDirectoryOptOut>true</AMSDirectoryOptOut>
    <AgreedToTermsDateTime>2024-03-28T09:07:03.1294441-04:00</AgreedToTermsDateTime>
    <CompanyLegacyContactKey>sample string 20</CompanyLegacyContactKey>
    <CompanyName>sample string 12</CompanyName>
    <CompanyTitle>sample string 13</CompanyTitle>
    <ContactKey>735ab548-673f-4396-a9b3-d86326d4df8d</ContactKey>
    <ContactStatusCode>sample string 8</ContactStatusCode>
    <Designation>sample string 15</Designation>
    <DisplayName>sample string 6</DisplayName>
    <EmailAddress>sample string 7</EmailAddress>
    <FirstName>sample string 4</FirstName>
    <HLContactMeOptOut>true</HLContactMeOptOut>
    <HLDirectoryOptOut>true</HLDirectoryOptOut>
    <InformalName>sample string 17</InformalName>
    <IsCompany>true</IsCompany>
    <LargePictureUrl>sample string 24</LargePictureUrl>
    <LastName>sample string 5</LastName>
    <LegacyContactKey>sample string 16</LegacyContactKey>
    <LinkToProfile>sample string 1</LinkToProfile>
    <MiddleName>sample string 18</MiddleName>
    <PictureUrl>sample string 2</PictureUrl>
    <PrefixCode>sample string 9</PrefixCode>
    <SuffixCode>sample string 14</SuffixCode>
    <UpdatedByContactKey>59a0cd31-9397-439f-bb8f-0efbf27a2387</UpdatedByContactKey>
    <UpdatedOn>2024-03-28T09:07:03.1294441-04:00</UpdatedOn>
  </CommentAuthor>
  <CommentBody>sample string 2</CommentBody>
  <CommentKey>7b8f0c58-4a3f-44e4-ad55-83b939cda0ab</CommentKey>
  <CreatedOn>2024-03-28T09:07:03.1294441-04:00</CreatedOn>
  <IsOfficial>true</IsOfficial>
  <ItemKey>d480422f-959c-4cfc-9690-6ed80f295baa</ItemKey>
  <UpdatedOn>2024-03-28T09:07:03.1294441-04:00</UpdatedOn>
</Comment>