Forum Discussion

Reilly's avatar
Reilly
New Contributor
7 years ago

API to access review notes

Hi, I have been looking at the command line and JSON APIs in a hope to access review notes programmatically (not comments on a review). So far I have had no luck, is this possible?

 

Cheers,

Reilly

  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)

    Hi,

     

    May I request a screenshot of a review note? I just wanted to make sure that we're talking about the same thing. Right now, I'm not sure if you mean a review material note or a chat message or something else.

     

    Thanks!

    • OlegB's avatar
      OlegB
      SmartBear Alumni (Retired)

      You can use the ReviewServices.getComments call:

       

      [{"command" : "ReviewService.getComments", 
      "args" : { 
      "reviewId" : "11" }
      }]

      As a result, you will get a comment with the '"type" : "NOTE"' type:

      "result" : {
          "comments" : [ {
            "location" : "14.xml, Annotation",
            "type" : "NOTE",
            "creationDate" : "2018-03-19T12:04:27+03:00",
            "text" : "Comment in the "Notes" field",
            "creatorInfo" : {
              "name" : "Administrator",
              "login" : "admin",
              "userId" : "1",
              "email" : ""
            },
            "conversationId" : 8,
            "commentId" : 16,
            "reviewId" : 15
          }

      All other comments have the '"type" :  "User"' type.

       

       

      I hope this helps!