Giter Club home page Giter Club logo

qualtrics_api's Introduction

Qualtrics_API

Python scripts that use the Qualtrics APIs.

import Qualtrics

apiToken = os.environ["Q_API_TOKEN"]     
dataCenter = os.environ["Q_DATA_CENTER"] 

qualtrics = Qualtrics(apiToken, dataCenter)

qualtrics.download_all_responses()

To Do

  • add pagination to list_groups
  • add support for divisionId to list_groups
  • add all options for creating completedResponse event handler
  • make delete_all_responses verify the user wants to perform the action
  • change completedResponse to abstract the event

Native Methods

Methods for all public APIs listed here

The currently (constantly updating) supported methods:

  • list_surveys (List Surveys API documentation)
  • get survey (Get Survey API documentation)
  • list_groups (List Groups API documentation)
  • get_group (Get Group API documentation)
  • update_response
  • delete_response
  • create_session
  • get_session
  • update_session
  • close_session

Custom Methods

  • retake_response allows you to reake a repsonse. Old surveys built on Qualtrics' old engine (not JFE) are not compatible with this call. This is because how the baseURL is formatted.

      Parameters  
    
      * surveyId (string) --> the survey that the response is associated with
      * responseId (string) --> the specific ID of the response you want to retake
      * delete (bool) --> defaults to False, this allows you to either delete the old response that you are retaking or "retake as new response" and keep the prior response as well
    
  • retake_unfinished_responses allows you to reake all unfinished repsonses assicated with a survey. Old surveys built on Qualtrics' old engine (not JFE) are not compatible with this call. This is because how the baseURL is formatted.

      Parameters
    
      * surveyId (string) --> the survey that the response is associated with
      * delete (bool) --> defaults to False, this allows you to either delete the old response that you are retaking or "retake as new response" and keep the prior response as well
    
  • get_all_surveys returns an array of the JSON objects for each survey returned from a get_survey call. (No parameters)

  • download_responses first creates the response export, then once the file is ready to be downloaded, it initates the download by either writing it to disk or unzipping the data in memory and returning it.

      Parameters
    
      * surveyId (string) --> the survey that the response is associated with
      * format_type (string) --> defaults to csv, can be json, csv, csv2013, or spss
      * path (string) --> defaults to None, and then creates a downlaod folder at the path the call was made to download the data
      * download (bool) --> defaults to True, if False it will not save the data, but instead unzip the response in memory and return its contents
    
      * The rest of the accepted parameters can be found on the [API page](https://api.qualtrics.com/docs/create-response-export)
    
  • download_responses_new first creates the response export, then once the file is ready to be downloaded, it initates the download by either writing it to disk or unzipping the data in memory and returning it. This gets data from the new Data rather than the Legacy format.

      Parameters
    
      * surveyId (string) --> the survey that the response is associated with
      * format_type (string) --> defaults to csv, can be json, csv, csv2013, or spss
      * path (string) --> defaults to None, and then creates a downlaod folder at the path the call was made to download the data
      * download (bool) --> defaults to True, if False it will not save the data, but instead unzip the response in memory and return its contents
    
      * The rest of the accepted parameters can be found on the [API page](https://api.qualtrics.com/docs/create-response-export-new)
    
  • download_all_responses allows you to download all of the data associated with all of your surveys. This call will create a directory called "downloads" at whatever path the call is made from.

      Parameters
    
      * format_type (string) --> defaults to csv, can be json, csv, csv2013, or spss
    
  • delete_all_responses allows you to delete all of your data and clear out all of your responses associated with all of your data.

  • create_completedResponse_event attach a new completedResponse event to your survey to ping an external survey everytime a survey is completed.

      Parameters
    
      * `surveyId` (string) --> the survey that you want to attach the event to
      * `serverURL` (string) --> the exposed server endpoint you want to ping
    

Dependencies

  • Selenium
  • requests

qualtrics_api's People

Contributors

dwallach1 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

aftab-h rush175

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.