Skip to content

Server Request Endpoints

Bob Evans edited this page Mar 18, 2015 · 2 revisions

A Guide to Making Paco Server Requests.

Introduction

The Android, iOS, and GWT clients often need to make server requests to retrieve experiments and other data. Some of the server requests that can be made are enumerated below.

For the Paco production server, request uris begin with quantifiedself.appspot.com

For the Paco development server, begin request uris with (insert url here)

Server Endpoints

Experiment Retrieval

/experiments?[mine|admin|public] - Returns a JSON string representing the list of all experiments available to the user making the request. The experiment definitions are abbreviated to the core details. The respective parameter determines which set of experiments are returned. (mine - available for me to join) (admin - those I have created or administer) (public - those published publicly to everyone)

/experiments?id={ID_LIST} - Returns a JSON string representing the list of experiments whose id’s are represented in the id list. {ID_LIST} is a comma-separated list of numerical experiment id’s corresponding to the experiments to be fetched. Invalid id’s will be disregarded by the server. The experiment definitions are represented in their entirety (description and inputs etc..).

Sample Output

/experiments?[mine|admin|public] :

[{"title":"AndroidTest - Fixed, ESM","description":"Description","informedConsentForm":"Informed consent text","creator":"donti@google.com","fixedDuration":false,"id":4051,"signalingMechanisms":[{"type":"signalSchedule","type":"signalSchedule","id":4052,"scheduleType":4,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false}],"schedule":{"type":"signalSchedule","type":"signalSchedule","id":4052,"scheduleType":4,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372463062796,"inputs":[{"id":4054,"questionType":"question","text":"question1","mandatory":false,"responseType":"open text","likertSteps":5,"name":"question1","conditional":false,"listChoices":[],"invisibleInput":false},{"id":4055,"questionType":"question","text":"","mandatory":false,"responseType":"location","likertSteps":5,"name":"question2","conditional":false,"listChoices":[],"invisibleInput":true}],"feedback":[{"id":4136,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2},{"title":"AndroidTest - Ongoing, Daily","description":"Description","informedConsentForm":"Informed Consent Text","creator":"donti@google.com","fixedDuration":false,"id":4040,"signalingMechanisms":[{"type":"signalSchedule","type":"signalSchedule","id":4041,"scheduleType":0,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000,61200000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false}],"schedule":{"type":"signalSchedule","type":"signalSchedule","id":4041,"scheduleType":0,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000,61200000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372462954815,"inputs":[{"id":4043,"questionType":"question","text":"question1","mandatory":false,"responseType":"likert","likertSteps":5,"name":"question1","conditional":false,"listChoices":[],"invisibleInput":false},{"id":4044,"questionType":"question","text":"question2","mandatory":false,"responseType":"list","likertSteps":5,"name":"question2","conditional":false,"listChoices":["choice1","choice2","choice3"],"invisibleInput":false}],"feedback":[{"id":4138,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2},{"title":"AndroidTest - Ongoing, Monthly","description":"","informedConsentForm":"","creator":"donti@google.com","fixedDuration":false,"id":4069,"signalingMechanisms":[{"type":"signalSchedule","type":"signalSchedule","id":4070,"scheduleType":3,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[54000000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false}],"schedule":{"type":"signalSchedule","type":"signalSchedule","id":4070,"scheduleType":3,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[54000000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372718396514,"inputs":[{"id":4072,"questionType":"question","text":"q1","mandatory":false,"responseType":"likert","likertSteps":5,"name":"q1","conditional":false,"listChoices":[],"invisibleInput":false}],"feedback":[{"id":4140,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2},{"title":"AndroidTest - Ongoing, Triggered","description":"Description","informedConsentForm":"Informed Consent Text","creator":"donti@google.com","fixedDuration":false,"id":4046,"signalingMechanisms":[{"type":"trigger","type":"trigger","eventCode":0,"delay":5000,"id":4047}],"schedule":{"type":"signalSchedule","scheduleType":5,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372463004463,"inputs":[{"id":4049,"questionType":"question","text":"question1","mandatory":false,"responseType":"likert","likertSteps":5,"name":"question1","conditional":false,"listChoices":[],"invisibleInput":false}],"feedback":[{"id":4142,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2}]

/experiments?id=4051 :

[{"title":"AndroidTest - Fixed, ESM","description":"Description","informedConsentForm":"Informed consent text","creator":"donti@google.com","fixedDuration":false,"id":4051,"signalingMechanisms":[{"type":"signalSchedule","type":"signalSchedule","id":4052,"scheduleType":4,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false}],"schedule":{"type":"signalSchedule","type":"signalSchedule","id":4052,"scheduleType":4,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372463062796,"inputs":[{"id":4054,"questionType":"question","text":"question1","mandatory":false,"responseType":"open text","likertSteps":5,"name":"question1","conditional":false,"listChoices":[],"invisibleInput":false},{"id":4055,"questionType":"question","text":"","mandatory":false,"responseType":"location","likertSteps":5,"name":"question2","conditional":false,"listChoices":[],"invisibleInput":true}],"feedback":[{"id":4136,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2}]

/experiments?id=4051,4069 :

{"title":"AndroidTest - Fixed, ESM","description":"Description","informedConsentForm":"Informed consent text","creator":"donti@google.com","fixedDuration":false,"id":4051,"signalingMechanisms":[{"type":"signalSchedule","type":"signalSchedule","id":4052,"scheduleType":4,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false}],"schedule":{"type":"signalSchedule","type":"signalSchedule","id":4052,"scheduleType":4,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[57600000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372463062796,"inputs":[{"id":4054,"questionType":"question","text":"question1","mandatory":false,"responseType":"open text","likertSteps":5,"name":"question1","conditional":false,"listChoices":[],"invisibleInput":false},{"id":4055,"questionType":"question","text":"","mandatory":false,"responseType":"location","likertSteps":5,"name":"question2","conditional":false,"listChoices":[],"invisibleInput":true}],"feedback":[{"id":4136,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2},{"title":"AndroidTest - Ongoing, Monthly","description":"","informedConsentForm":"","creator":"donti@google.com","fixedDuration":false,"id":4069,"signalingMechanisms":[{"type":"signalSchedule","type":"signalSchedule","id":4070,"scheduleType":3,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[54000000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false}],"schedule":{"type":"signalSchedule","type":"signalSchedule","id":4070,"scheduleType":3,"esmFrequency":3,"esmPeriodInDays":0,"esmStartHour":32400000,"esmEndHour":61200000,"times":[54000000],"repeatRate":1,"weekDaysScheduled":0,"nthOfMonth":1,"byDayOfMonth":true,"dayOfMonth":1,"esmWeekends":false,"byDayOfWeek":false},"questionsChange":false,"modifyDate":1372718396514,"inputs":[{"id":4072,"questionType":"question","text":"q1","mandatory":false,"responseType":"likert","likertSteps":5,"name":"q1","conditional":false,"listChoices":[],"invisibleInput":false}],"feedback":[{"id":4140,"feedbackType":"display","text":"Thanks for Participating!"}],"publishedUsers":[],"deleted":false,"webRecommended":false,"version":2}

Clone this wiki locally