ATLAS FormBuilder - Webservice Quickstart

Short commands to get started using the FormBuilder webservice.

FormBuilder provides a REST-like webservice. For full API documentation visit https://apps.atlas.illinois.edu/formbuilderservice/

Read All Form Responses for a Form

Request

curl --user "UOFI\[username]" --header "X-Api-Version:1" --header "Accept:application/json" "https://appsdev.atlas.illinois.edu/FormBuilderService/api/FormResponse?formId=[formId]"

Response

[
   {
      "IsWaitlisted":false,
      "HasRegistrationOffer":false,
      "HasExpiredRegistrationOffer":false,
      "IsChildFormResponse":false,
      "ReferenceIdentifier":"iuro-yyyy-yyyy-y",
      "FormId":"686e11d5-a6f1-4c3c-a9fe-aa1c00ee75b6",
      "CurrentPhaseId":"596c3051-7a37-49e0-b4fd-aa1c00ee9933",
      "PeriodId":"016f2632-2e4e-4bc5-8aef-aa1c00ee75b6",
      "AssociatedUser":"user1@illinois.edu",
      "SubmittedBy":"user1@illinois.edu",
      "SubmittedByIp":"::1",
      "CreatedOn":"2019-04-04T16:19:37.043Z",
      "CreatedBy":"user1@illinois.edu",
      "CreatedByIp":"::1",
      "SubmissionCompleted":true,
      "LastModifiedOn":"2019-04-04T16:19:37.087Z",
      "LastModifiedBy":"user1@illinois.edu",
      "LastModifiedByIp":"::1",
      "SubmissionCompletedOn":"2019-04-04T16:19:37.057Z",
      "SubmissionCancelled":false,
      "Questions":[
         {
            "Id":"5f7113a1-0c1e-483e-bac5-aa1c00eebfb0",
            "FieldName":"this_is_a_text_input_box",
            "Answers":[
               {
                  "FormResponseId":"c55c375e-79ca-41e4-9579-aa2500baa986",
                  "QuestionId":"5f7113a1-0c1e-483e-bac5-aa1c00eebfb0",
                  "AnswerValue":"ert",
                  "OriginalAnswerDisplayValue":null,
                  "LastModifiedOn":"0001-01-01T00:00:00",
                  "LastModifiedBy":null
               }
            ],
            "ChildQuestions":[

            ]
         }
      ],
      "ChildFormResponseIds":[

      ],
      "Id":"c55c375e-79ca-41e4-9579-aa2500baa986"
   },
   {
      "IsWaitlisted":false,
      "HasRegistrationOffer":false,
      "HasExpiredRegistrationOffer":false,
    ...
   }
]

Update the answer to a question for a single form response

Note: when updating a form response, the permissions for the phase that the response is in apply to the user that is making the request. It is as if the user were filling out the survey portion of the form with all of the validation rules attached to it.

Request

curl --user "UOFI\exampleUser" --header "X-Api-Version:1" --header "Accept:application/json" --header "Content-Type:application/json" -X PUT -d '[ { "QuestionFieldName": "this_is_a_text_input_box", "AnswerValue": "new value goes here!" } ]' "https://apps.atlas.illinois.edu/FormBuilderService/api/FormResponse/{id}?formId={formId}"

Response

{
   "Successful":true,
   "Action":"RedirectToSurvey",
   "ExecutedActions":[
      {
         "ActionType":"Internal"
      }
   ],
   "FormResponse":{
      "IsWaitlisted":false,
      "HasRegistrationOffer":false,
      "HasExpiredRegistrationOffer":false,
      "IsChildFormResponse":false,
      "ReferenceIdentifier":"iuro-yyyy-yyyy-y",
      "FormId":"686e11d5-a6f1-4c3c-a9fe-aa1c00ee75b6",
      "CurrentPhaseId":"596c3051-7a37-49e0-b4fd-aa1c00ee9933",
      "PeriodId":"016f2632-2e4e-4bc5-8aef-aa1c00ee75b6",
      "AssociatedUser":"user1@illinois.edu",
      "SubmittedBy":"user1@illinois.edu",
      "SubmittedByIp":"::1",
      "CreatedOn":"2019-04-04T16:19:37.043Z",
      "CreatedBy":"user1@illinois.edu",
      "CreatedByIp":"::1",
      "SubmissionCompleted":true,
      "LastModifiedOn":"2019-04-09T19:59:56.427Z",
      "LastModifiedBy":"exampleUser@illinois.edu",
      "LastModifiedByIp":"123.45.678.90",
      "SubmissionCompletedOn":"2019-04-04T16:19:37.057Z",
      "SubmissionCancelled":false,
      "Questions":[
         {
            "Id":"5f7113a1-0c1e-483e-bac5-aa1c00eebfb0",
            "FieldName":"this_is_a_text_input_box",
            "Answers":[
               {
                  "FormResponseId":"c55c375e-79ca-41e4-9579-aa2500baa986",
                  "QuestionId":"5f7113a1-0c1e-483e-bac5-aa1c00eebfb0",
                  "AnswerValue":"new value goes here!",
                  "OriginalAnswerDisplayValue":null,
                  "LastModifiedOn":"0001-01-01T00:00:00",
                  "LastModifiedBy":null
               }
            ],
            "ChildQuestions":[

            ]
         }
      ],
      "ChildFormResponseIds":[

      ],
      "Id":"c55c375e-79ca-41e4-9579-aa2500baa986"
   }
}



Keywords:formbuilder, webservice   Doc ID:91087
Owner:Tim S.Group:University of Illinois Liberal Arts and Sciences
Created:2019-04-16 10:23 CSTUpdated:2019-11-07 08:30 CST
Sites:University of Illinois Liberal Arts and Sciences
Feedback:  0   0