Date of Interview

in my dashboards, I want to see a graph of how many interviews were conducted by each interviewer by date, like this:

I am able to achieve this, but for this I have to download all my data using the suso_export command form the SuSo R package. This generates the data on the server, then downloads it. It takes a while for the process to complete every time.

Using the suso_getAllInterviewQuestionnaire command my graph looks different:

This is because the date generated by the suso_getAllInterviewQuestionnaire command is last action date and not the interview start date (Which we collect in the form).

Is there a way to get the interview start time (collected in the interview), without downloading the entire dataset?

suso_get_stats doesn’t seem to be working for the date variable.

For the moment, I think the answer is a qualified “no” (unless I’m missing something).

Here’s a partial work-around. If downloading all data takes too long, consider downloading only some data in order to update your report for new periods. The POST ​/api​/v2​/export endpoint allows users to specify From and To parameters to delimit the data during a period, where there date for an interview is the date of its last change. Requests of this type might take less time. The ease of inserting this data into your reporting data set is unclear.

In future, I hope there will be another option via the GraphQL API (see link under Maps API header here), if SuSo invests more in this direction. With GraphQL (i.e., the general technology), one sends the server a request for specific data and the server provides just that and nothing more. With that in mind, one might be able to request only specific variables rather than the full data set. For the moment, this isn’t possible. The current schema covers some but not all of the REST API endpoints. But GraphQL, to my mind, opens the door to what you have in mind. Of course, this power isn’t without a cost. Using this type of functionality would require some knowledge of GraphQL, an understanding of SuSo’s schema, and a client/library for making GraphQL queries (e.g., the ghql package for R or others here) and some skills with parsing (nested) JSON.

Same interview may be completed multiple times (after supervisor reject). What date exactly are you trying to get?

The date on which the interview was started for the first time.

You can query graphql with the following query:

{
  interviews(where: {createdDate_gt: "2020-09-25"}) {
    filteredCount
    nodes {
      createdDate
      responsibleName
    }
  }
}

It will give you a list of interview creation dates with interviewers:

You can download graphql schema from your server, URL is /graphql/schema. I suppose that there should be some existing solutions in R to consume graphql api.

While working with the latest version (21.06.2), observe the following while being authenticated with the admin account:

The correct syntax is:

{
  interviews(where: {createdDate: {gt: "2020-09-25"}}) {
    filteredCount
    nodes {
      createdDate
      responsibleName
    }
  }
}

A helpful article on the topic by Praveen Durairaju is here:

Hope this helps, Sergiy Radyakin

1 Like