Get interview status history by API / GraphQL

Hello,

I need to get “interview status history” table into my aplication because I need to show all the comments.
Is it posiible to get this data using API or GraphQL? Or can you recomend some other way?

Thank you.
Martin.

Hello Martin,

these comments are part of all comments exported in the interview__comments file, see for details:

You can trigger the export of data programmatically via the API, of course.

For my purpose, generating an export with thousands of interviews is too slow, as I need to view comments for several interviews. The export on our server now takes about 2-4 minutes.

Isn’t there any other solution?

Good day @martinb ,
/api/v1/interviews/{id}/history could help you to get an status history for any interview. You can find more information here.

1 Like

Hello @vfedoseev ,

The amount of information in the output of interview/{…}/history is excessively lengthy, resulting in a lengthy loading time. In larger interviews, it takes more than a minute to retrieve the output.

In a smaller interview that I tested, the output had 935 actions and took around 10 seconds to load. I am interested in getting only the “Interview status history” with comments, as I sended printscreen in first message.

Currently, supervisors must manually open each interview and click on “Interview status history” to view the comments. Instead, I would like to display the last comment in the Table view of interviews in my application.

If feasible, it would be greatly appreciated to have an alternative option in the future that specifically retrieves the status history.
Something like /api/v1/interviews/{id}/statushistory

Thank you.

Hello @martinb,

  1. you’ve mentioned that you are writing your own application. Can you tell more about it please? What is the task that it solves? What functionality it provides? Who are the users? Is this open source?

  2. The performance depends on the infrastructure. If you are seeing the timing for the response to this call at about 10 seconds for an interview with approximately 1000 actions, then this is not adequate. You should see same performance for the response to this query and calling the interview history from the HQ interface. Make sure this is not the first call to the server as it takes time to wake it up if it is dormant/sleeping. Also make sure the connection speed is adequate for the expected responsiveness.

Best, Sergiy

Hello sergiy,

  1. I am developing an application for supervisors as Survey Solutions lacks certain features that are necessary for our work. Specifically, we require the ability to group 6 or 10 assignments together based on the survey. These smallgroups can be easily set by supervisors for a specific week when interviewers need to conduct the interviews. Subsequently, supervisors can select a date for sending the assignment to the interviewer. And some other things…
    Currently, the application is not open source, but there may be plans to release it as open source in the future.
    All other roles use the default Survey Solutions applications and web app.

I don’t believe that the issue is related to internet connection or server inactivity.
It looks like its not a same response.
In HQ interface I only get few “Actions”, when interwiew changed status.
In API interview/{…}/history I get all Actions… like variable enabled, variable set, paused, resumed, Question Declared Invalid, Valid, etc.
For example:

{
      "Index": 1200,
      "Action": "VariableSet",
      "OriginatorName": "",
      "OriginatorRole": "",
      "Parameters": {
        "variable": "fx_L_vek_setreni",
        "value": "věk: 84",
        "roster": "0"
      },
      "Timestamp": "2023-01-20T10:47:02.295722Z",
      "Offset": "01:00:00"
    },
    {
      "Index": 1201,
      "Action": "VariableSet",
      "OriginatorName": "",
      "OriginatorRole": "",
      "Parameters": {
        "variable": "L_oaStatus_o",
        "value": "Minulá přítomnost: Šetřená",
        "roster": "0"
      },
      "Timestamp": "2023-01-20T10:47:02.295722Z",
      "Offset": "01:00:00"
    },