Reading Comments from API (Rest or GraphQL)

How to read interview comments using either Rest API or GraphQL.
I could not locate the right call to retrieve interview comments.

Thanks for help.

I think the comments are only available as part of the exported data. Let’s see if the developers prove me wrong. :crossed_fingers:

In GraphQL, the interviewer object only had metadata as nodes–basically, the info one can see on the Interviews tab of Headquarters.

In REST, the GET /api/v1/interviews/{id} endpoint seems give one all of the data for an interview in JSON format. I’ve never used it. I’m not sure whether comments are included.

Thanks.
GET /api/v1/interviews/{id} only gives array of variable/questionid/answer
unless there is a special code for comments.

@alsaleem,

comments left to the interview at completion, approval, rejection, etc are accessible via the REST call to /api/v1/interviews/{id}/history
The response will look like below (fragment shown), with the comment field is what you are after.

If you meant anything else, please elaborate what is your situation and the problem you are solving.

Best, Sergiy

{
  "InterviewId": "77d56ddf-ed54-45ba-ba0a-0f9b2d564f17",
  "QuestionnaireId": "40854be8-ce1c-4798-9bb0-574667d9da79",
  "QuestionnaireVersion": 1,
  "Records": [
    {
      "Index": 0,
      "Action": "InterviewCreated",
      "OriginatorName": "SergiyInt23",
      "OriginatorRole": "Interviewer",
      "Parameters": {},
      "Timestamp": "2025-01-30T15:59:07.0968549Z",
      "Offset": "-05:00:00"
    },
...............................................................
     ,
    {
      "Index": 18,
      "Action": "RejectedBySupervisor",
      "OriginatorName": "DemoHQ",
      "OriginatorRole": "Headquarter",
      "Parameters": {
        "comment": "Test Comment"
      },
      "Timestamp": "2025-01-30T18:30:57.839859Z",
      "Offset": "-05:00:00"
    }
  ]
}

Thanks @sergiy. This is what I am looking for.
I check it in this page but had no clue how to identify it.

@sergiy , just for completeness, what about comments to questions in the interview? Am I right that those are only available in the exported data?

Hello @arthurshaw2002 , the topic starter confirmed he/she was looking for the comments to transactions and that is what I provided. I am not aware of any published REST or GraphQL queries in Survey Solutions resulting in reading comments to specific questions (beyond the export that you’ve already mentioned). If that is specifically required for a real project, please, provide the details. Best, Sergiy.