Closed g11217 closed 3 months ago
The functions in the qualtRics R package align pretty closely with the Qualtrics API. You can see the endpoint documentation here for distributions here: https://api.qualtrics.com/9128704e20b4e-distributions The package here wraps these kinds of API calls for R, so I think what you are reporting is just how the API itself works.
You can check it out for yourself by more directly calling the API endpoint. First make your URL, which will be something like "https://iad1.qualtrics.com/API/v3/distributions/EMD_RmjB8Gfpjlki6ms/links?surveyId=SV_06PSFx0kpItCz0q"
:
url <- qualtRics:::generate_url(
query = "listdistributionlinks",
distributionID = distributionID,
surveyID = surveyID)
Then you'll need headers for the API call with your authentication:
headers <- qualtRics:::construct_header(Sys.getenv("QUALTRICS_API_KEY"))
Then you can make an API call:
res <- httr::GET(url, config = httr::add_headers(headers))
httr::content(res, as = "parsed")
The real package handles paginating through the result, but this gives you the idea. If you want to ask about your missing records, I would put together the URL you are querying plus the results you get and open a Qualtrics support ticket.
is there a way to call the complete distribution records in a single run (instead of running fetch_distribution_history(), and list_distribution_links(), sequentially, and call left_jon() )?
I'm pretty sure the answer to this is "no" but take a look at the API docs and see if something else returns what you are looking for.
Let us know if you have further questions! 🙌
Hello,
It seems qualtRics pulls distribution file in two parts, fetch_distribution_history(), and list_distribution_links(). The main difference btw these two is that list_distribution_links() includes externalDataReference field (one of unique identifiers used for de-dup purpose). I can join fetch_distribution_history() and list_distribution_links() by contactId.
The issue that I have is that list_distribution_links() does not pull all distribution records, > 48 hours past of 'sendDate' field in distribution ( fetch_distributions( all_surveys()$id[n] ) ). e.g., I'm pulling 27570 distribution records and missing 108 (~0.4%).
So, the questions are 1) do you think this is some sort of lag in server sync (even > 48 hours)? If so, is there a way around this to create real-time call? 2) is there a way to call the complete distribution records in a single run (instead of running fetch_distribution_history(), and list_distribution_links(), sequentially, and call left_jon() )?
Thank you.
P.S., btw, huge fan of tidytext, and up-and-coming fan of qualtRics