답변 가져오기

특정 설문(form_id)에 제출된 답변 데이터를 가져옵니다.

[GET] https://api.moaform.com/v1/forms/{form_id}/responses

 

요청

Path Parameters

KeyDescription
form_id필수. 설문의 고유 ID

 

Query Parameters

KeyTypeDescription
pageinteger가져올 목록의 페이지. 기본값 1
page_sizeinteger페이지당 가져올 목록의 개수. 기본값 25, 최대값 1000
sincestring지정된 날짜와 시간 이후로 제출된 답변으로 요청을 제한 (예: 2020-03-20T14:00:59Z)
untilstring지정된 날짜와 시간 이전으로 제출된 답변으로 요청을 제한 (예: 2020-03-20T14:00:59Z)
afterstring지정된 response_id 후에 제출된 답변으로 제한. 해당 response_id 미포함
beforestring지정된 response_id 전에 제출된 답변으로 제한. 해당 response_id 미포함
included_response_idsstring지정된 response_id를 포함하는 답변으로 제한. 여러개를 지정하려면 쉼표로 구분하여 요청
excluded_response_idsstring지정된 response_id를 제외한 답변으로 제한. 여러개를 지정하려면 쉼표로 구분하여 요청
sort_bystring목록 정렬 필드. 기본값은 `submitted_at`(현재 `submitted_at` 만 허용)
order_bystring정렬 순서. 기본값 `asc`(오름차순 정렬 `asc`, 내림차순 정렬 `desc`중 하나)

 

응답

KeyTypeDescription
total_itemsinteger결과 목록의 전체 개수
page_countinteger페이지 개수
items[object] 
↳ hiddenobject 
     ↳ d[n]string히든필드가 있을 경우에만 모든 히든 필드들을 같은 위계로 표시. n=1~100
↳ response_idstring답변의 고유 ID
↳ response_codestring답변 코드 (중복답변 제한 설정에서 '답변코드 및 URL로 제한' 옵션을 이용할 때의 그 코드이며, 코드값이 있을 때만 전송)
↳ started_atstring답변 시작 일시
↳ submitted_atstring답변 제출 일시
↳ metadataobject 
     ↳ browserstring답변자 브라우저 정보
     ↳ operating_systemstring답변자 운영체제 정보
     ↳ devicestring답변자 장치 정보
     ↳ user_agentstring답변자의 User Agent
↳ answers[object] 
     ↳ blockobject 
          ↳ idstring항목의 고유 ID
          ↳ typestring항목의 타입
     ↳ typestring답변의 타입 (아래 별도 table 에서 타입별로 계속 설명. 각 타입별로 이 KEY를 포함하여 아래 ... 위치를 대체)
.........
↳ thankyouobject 
     ↳ idstring맺음말의 고유 ID
     ↳ urlstring맺음말의 URL

 

답변의 type 상세

choice (여러 보기들 중 하나만 선택)

KeyTypeDescription
     ↳ typestringchoice
     ↳ choiceobject 
          ↳ idstring보기의 고유 ID
          ↳ labelstring보기의 내용
          ↳ scoreinteger보기에 할당된 점수 (점수가 할당되어야만 나옴)
          ↳ otherstring기타 보기에 입력한 답변 (기타 답변일 경우에만 나타남)

 

choices (여러 보기들 중 여러개 선택)

KeyTypeDescription
     ↳ typestringchoices
     ↳ choices[object] 
          ↳ idstring보기의 고유 ID
          ↳ labelstring보기의 내용
          ↳ scoreinteger보기에 할당된 점수 (점수가 할당되어야만 나옴)
          ↳ otherstring기타 보기에 입력한 답변 (기타 답변일 경우에만 나타남)

순위형 질문의 경우 나열되는 답변의 순서가 곧 순위입니다.

 

media_choice (여러 미디어 보기들 중 하나만 선택)

KeyTypeDescription
     ↳ typestringmedia_choice
     ↳ media_choiceobject 
          ↳ idstring보기의 고유 ID
          ↳ labelstring보기의 내용
          ↳ scoreinteger보기에 할당된 점수 (점수가 할당되어야만 나옴)
          ↳ otherstring기타 보기에 입력한 답변 (기타 답변일 경우에만 나타남)
          ↳ mediaobject 
               ↳ typestring미디어 형태 (현재는 image only)
               ↳ urlstring이미지 URL

 

media_choices (여러 미디어 보기들 중 여러개 선택)

KeyTypeDescription
     ↳ typestringmedia_choices
     ↳ media_choices[object] 
          ↳ idstring보기의 고유 ID
          ↳ labelstring보기의 내용
          ↳ scoreinteger보기에 할당된 점수 (점수가 할당되어야만 나옴)
          ↳ otherstring기타 보기에 입력한 답변 (기타 답변일 경우에만 나타남)
          ↳ mediaobject 
               ↳ typestring미디어 형태 (현재는 image only)
               ↳ urlstring이미지 URL

순위형 질문의 경우 나열되는 답변의 순서가 곧 순위입니다.

 

text (주관식)

KeyTypeDescription
     ↳ typestringtext
     ↳ textstring텍스트 입력값
     ↳ encryptedboolean답변 암호화 저장 여부 ("true" 일때만 나옴)

 

email (이메일)

KeyTypeDescription
     ↳ typestringemail
     ↳ emailstring이메일 주소
     ↳ encryptedboolean답변 암호화 저장 여부 ("true" 일때만 나옴)

 

url (url)

KeyTypeDescription
     ↳ typestringurl
     ↳ urlstring웹사이트 URL
     ↳ encryptedboolean답변 암호화 저장 여부 ("true" 일때만 나옴)

 

number (답변이 숫자인 경우, 척도형, 별점형, 수치입력형 등)

KeyTypeDescription
     ↳ typestringnumber
     ↳ numbernumber답변 숫자값
     ↳ encryptedboolean답변 암호화 저장 여부 (수치입력형만, "true" 일때만 나옴)

 

address (주소)

KeyTypeDescription
     ↳ typestringaddress
     ↳ address[object] 
          ↳ streetstringstreet 입력값 (visibile_fields로 정의되어야만 나옴)
          ↳ detailstringdetail 입력값 (visibile_fields로 정의되어야만 나옴)
          ↳ citystringcity 입력값 (visibile_fields로 정의되어야만 나옴)
          ↳ regionstringregion 입력값 (visibile_fields로 정의되어야만 나옴)
          ↳ postal_codestringpostal_code 입력값 (visibile_fields로 정의되어야만 나옴)
          ↳ countrystringcountry 입력값 (visibile_fields로 정의되어야만 나옴)
     ↳ encryptedboolean답변 암호화 저장 여부 ("true" 일때만 나옴)

 

files (첨부파일)

KeyTypeDescription
     ↳ typestringfiles
     ↳ files[object] 
          ↳ namestring파일명
          ↳ sizeinteger파일 사이즈
          ↳ url[object] 
               ↳ apistring파일 다운로드 API URL
               ↳ reportstring파일 다운로드 웹사이트 URL