Dataspace API specification (1.0.0)

Download OpenAPI specification:Download

Dataspace 에서 제공하는 API 에 대해 명세합니다.

인증

인증 방식

  • 데이터스페이스 API 는 HTTP Basic 인증방식을 사용합니다.
  • HTTPS 통신과 TLS 버전 1.2 이상만 지원합니다.

키 확인방법

Space ID, API 인증키가 필수값으로 요구됩니다.

Space ID : ‘데이터스페이스’당 1개의 Space ID가 자동으로 발급되어, 별도의 발급 절차가 필요하지 않습니다. 데이터스페이스에 소속된 사용자라면 누구나 조회할 수 있습니다.

API 인증키 : 발급 이후 조회할 수 있으며, 발급 및 재발급 권한은 ‘데이터스페이스 관리자 계정’에게 있습니다.

데이터스페이스에 로그인 후, [API] > [API 키] 메뉴에 접근하여 조회 및 복사하실 수 있습니다.

로그인 후에도 [API 키] 메뉴에 접근할 수 없다면, '데이터스페이스’에 멤버로 등록되었는지 확인해보세요.

키 사용방법

데이터스페이스의 모든 API는 HTTP Authorization header 에 Basic <crendentials> 추가해서 요청하도록 설계되어 있습니다.

Space IDAPI 인증키 사이에 : (콜론)을 추가하고 base64로 인코딩하세요.

credentials = base64({Space ID}:{API 인증키})


인코딩된 값을 API 의 Authorization header 를 다음과 같이 설정하세요.

Authorization: Basic base64({Space ID}:{API 인증키})


아래와 같은 형태로 API 요청이 가능합니다.

GET /v1/responses/... HTTP/1.1
Authorization: Basic

설문

설문 조회를 수행합니다.

설문 목록 조회

설문 목록을 조회합니다. 설문에 속한 수집그룹들의 상태에 따른 필터링이 가능합니다.

필터를 지정하지 않으면 모든 설문을 조회하고, RUNNING은 현재 진행중인 수집그룹이 있는 설문만 조회합니다.

설문 ID 와 설문 제목, 그리고 생성일자 및 최종 수정일자를 조회할 수 있습니다. 생성일 역순으로 1000 건씩 조회합니다.

Authorizations:
basic_authentication
query Parameters
collectGroupsStatus
string
Value: "RUNNING"

Responses

Response samples

Content type
application/json
{
  • "surveys": [
    ],
  • "nextSurveyId": "a01h1mzpact2df4gjfgq865f1gx"
}

설문 정보 조회

설문 ID(surveyId) 를 통해 설문 정보를 조회합니다.

Authorizations:
basic_authentication
path Parameters
surveyId
required
string
Example: a01hb7vt01vpahrwjyxgd28sf3a

Responses

Response samples

Content type
application/json
{
  • "surveyId": "a01hb7vt01vpahrwjyxgd28sf3a",
  • "title": "생활 관련 조사",
  • "questions": [
    ],
  • "parameters": [
    ],
  • "createdAt": "2023-10-02T00:00:00",
  • "updatedAt": "2023-10-02T00:00:00"
}

수집

수집 그룹에 대한 조회, 응답 링크 생성을 수행합니다.

수집그룹 목록 조회

설문 내 모든 수집그룹들의 정보를 생성일자 순으로 조회합니다.

Authorizations:
basic_authentication
path Parameters
surveyId
required
string
Example: a01hb7vt01vpahrwjyxgd28sf3a

Responses

Response samples

Content type
application/json
[
  • {
    }
]

수집그룹 정보 조회

수집그룹 ID(collectGroupId) 를 통해 수집그룹 정보를 조회합니다.

Authorizations:
basic_authentication
path Parameters
collectGroupId
required
string

Responses

Response samples

Content type
application/json
{
  • "collectGroupId": "a01h94kt4fyzmp64h40gzyvrjj7",
  • "surveyId": "a01hb7vt01vpahrwjyxgd28sf3a",
  • "name": "기본 링크 수집그룹",
  • "channel": "PUBLIC_LINK",
  • "status": "READY",
  • "targetCnt": 100,
  • "startedAt": "2023-10-04T00:00:00",
  • "completedAt": "2023-10-10T00:00:00",
  • "isUsingHmac": false,
  • "createdAt": "2023-10-02T00:00:00",
  • "updatedAt": "2023-10-03T00:00:00"
}

응답 URL 조회

수집그룹에 대한 응답 URL 목록을 조회합니다.
기본 링크(PUBLIC_LINK) 수집그룹의 경우에만 적용 가능합니다.
파라미터 값이 적용된 응답 URL 목록을 반환합니다.

Authorizations:
basic_authentication
path Parameters
collectGroupId
required
string
Request Body schema: application/json
Array
parameters
Array of objects

생성할 응답 URL 들에서 사용할 파라미터 값들.

URL 별로 파라미터 Key 에 해당하는 파라미터 값들을 지정할 수 있습니다.

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

수집그룹 serial 값 조회

수집그룹 ID(collectGroupId) 를 통해 수집그룹 serial 값을 조회합니다.

수집그룹이 기본링크(PUBLIC_LINK) 방식일 경우에만 serial 값을 조회할 수 있습니다.

Authorizations:
basic_authentication
path Parameters
collectGroupId
required
string

Responses

Response samples

Content type
application/json
"alLL85Y4J873H"

패널

패널에 대한 생성, 조회, 수정, 삭제를 수행합니다.

패널 생성

패널 정보를 생성합니다. 생성된 패널 정보가 반환됩니다.

Authorizations:
basic_authentication
query Parameters
email
required
string
Example: email=developer@opensurvey.io

개인정보 관련 동작에 대한 작업자 이메일로, 기록을 남기기 위해 필요합니다.

Request Body schema: application/json
uid
string <= 128 characters
name
string <= 64 characters

패널 이름

countryCode
string <= 3 characters

패널 휴대전화 번호의 국가코드

cellphone
string <= 14 characters

패널 휴대전화 번호, 국가코드, '-' 를 제외한 번호

email
string <= 40 characters

패널 이메일

object

패널 프로필 정보, key는 프로필 이름, value는 변수 옵션

Responses

Request samples

Content type
application/json
{
  • "uid": "47d5c15a-f080-4673-93a1-9a3ba8c63f45",
  • "name": "김패널",
  • "countryCode": 82,
  • "cellphone": "01000000000",
  • "email": "test@opensurvey.io",
  • "profileMaps": {
    }
}

Response samples

Content type
application/json
{
  • "panelId": "01H8NN0C49ZHDTKG8N6B7CF9E1",
  • "uid": "47d5c15a-f080-4673-93a1-9a3ba8c63f45",
  • "name": "김패널",
  • "countryCode": 82,
  • "cellphone": "01000000000",
  • "email": "test@opensurvey.io",
  • "isSmsOptOut": false,
  • "isEmailOptOut": false,
  • "profileMaps": {
    }
}

패널 조회

스페이스에 있는 모든 패널의 정보를 생성일 역순으로 조회합니다. 1000 건 단위로 끊어서 패널 정보를 조회합니다.

Authorizations:
basic_authentication
query Parameters
email
required
string
Example: email=developer@opensurvey.io

개인정보 관련 동작에 대한 작업자 이메일로, 기록을 남기기 위해 필요합니다.

remark
required
string

마스킹 되지 않은 개인정보에 대한 조회 사유

panelId
string

해당 패널부터 생성일 역순으로 1000 건씩 조회합니다.

Responses

Response samples

Content type
application/json
{
  • "panels": [
    ],
  • "nextPanelId": "01H8N8RZ0F1TB2EE280PZR12VK"
}

패널 수정

패널 ID 를 받아 해당 패널 정보를 수정합니다. 수정된 패널 정보가 반환됩니다.

Authorizations:
basic_authentication
path Parameters
panelId
required
string
Example: 01H8NN0C49ZHDTKG8N6B7CF9E1
query Parameters
email
required
string
Example: email=developer@opensurvey.io

개인정보 관련 동작에 대한 작업자 이메일로, 기록을 남기기 위해 필요합니다.

Request Body schema: application/json
uid
string <= 128 characters
name
string <= 64 characters

패널 이름

countryCode
string <= 3 characters

패널 휴대전화 번호의 국가코드

cellphone
string <= 14 characters

패널 휴대전화 번호, 국가코드, '-' 를 제외한 번호

email
string <= 40 characters

패널 이메일

isSmsOptOut
boolean

SMS 수신 거부 여부 (생성 시 초기 값은 false)

isEmailOptOut
boolean

Email 수신 거부 여부 (생성 시 초기 값은 false)

object

패널 프로필 정보, key는 프로필 이름, value는 변수 옵션

Responses

Request samples

Content type
application/json
{
  • "uid": "47d5c15a-f080-4673-93a1-9a3ba8c63f45",
  • "name": "김패널",
  • "countryCode": 82,
  • "cellphone": "01000000000",
  • "email": "test@opensurvey.io",
  • "isSmsOptOut": false,
  • "isEmailOptOut": false,
  • "profileMaps": {
    }
}

Response samples

Content type
application/json
{
  • "panelId": "01H8NN0C49ZHDTKG8N6B7CF9E1",
  • "uid": "47d5c15a-f080-4673-93a1-9a3ba8c63f45",
  • "name": "김패널",
  • "countryCode": 82,
  • "cellphone": "01000000000",
  • "email": "test@opensurvey.io",
  • "isSmsOptOut": false,
  • "isEmailOptOut": false,
  • "profileMaps": {
    }
}

패널 삭제

패널 ID 를 받아 해당 패널 정보를 삭제합니다. 삭제된 패널 ID 가 반환됩니다.

Authorizations:
basic_authentication
path Parameters
panelId
required
string
Example: 01H8NN0C49ZHDTKG8N6B7CF9E1
query Parameters
email
required
string
Example: email=developer@opensurvey.io

개인정보 관련 동작에 대한 작업자 이메일로, 기록을 남기기 위해 필요합니다.

Responses

Response samples

Content type
application/json
"01H8NN0C49ZHDTKG8N6B7CF9E1"

프로필 변수

프로필 변수, 옵션에 대한 생성, 조회, 수정, 삭제를 수행합니다.

프로필 변수 생성

프로필 변수를 생성합니다. 생성된 프로필 변수가 반환됩니다.

Authorizations:
basic_authentication
Request Body schema: application/json
name
string <= 64 characters

Responses

Request samples

Content type
application/json
{
  • "name": "지역"
}

Response samples

Content type
application/json
{
  • "profileVariableId": "01H77A5QFW76TKZVNJXJ4H0RV0",
  • "name": "지역"
}

프로필 변수 조회

스페이스에 있는 모든 프로필 변수의 정보를 생성일 역순으로 조회합니다. 1000 건 단위로 끊어서 프로필 변수를 조회합니다.

Authorizations:
basic_authentication
query Parameters
profileVariableId
string

해당 프로필 변수부터 생성일 역순으로 1000 건씩 조회합니다.

Responses

Response samples

Content type
application/json
{
  • "profileVariables": [
    ],
  • "nextProfileVariableId": "01H8N8RZ0EYGEB2MFESJ3VY9PJ"
}

프로필 변수 수정

프로필 변수 ID 를 받아 해당 프로필 변수를 수정합니다. 수정된 프로필 변수가 반환됩니다.

Authorizations:
basic_authentication
path Parameters
profileVariableId
required
string
Example: 01H77A5QFW76TKZVNJXJ4H0RV0
Request Body schema: application/json
name
string <= 64 characters

Responses

Request samples

Content type
application/json
{
  • "name": "지역"
}

Response samples

Content type
application/json
{
  • "profileVariableId": "01H77A5QFW76TKZVNJXJ4H0RV0",
  • "name": "지역"
}

프로필 변수 삭제

프로필 변수 ID 를 받아 해당 프로필 변수를 삭제합니다. 삭제된 프로필 변수 ID 가 반환됩니다.

Authorizations:
basic_authentication
path Parameters
profileVariableId
required
string
Example: 01H77A5QFW76TKZVNJXJ4H0RV0

Responses

Response samples

Content type
application/json
"01H77A5QFW76TKZVNJXJ4H0RV0"

프로필 옵션 생성

프로필 옵션을 생성합니다. 생성된 프로필 옵션이 반환됩니다.

Authorizations:
basic_authentication
path Parameters
profileVariableId
required
string
Example: 01H77A5QFW76TKZVNJXJ4H0RV0
Request Body schema: application/json
name
string <= 64 characters

Responses

Request samples

Content type
application/json
{
  • "name": "서울"
}

Response samples

Content type
application/json
{
  • "profileVariableOptionId": "01H779Z3FQEZ8Q1NPQQ2WNT2JY",
  • "profileVariableId": "01H77A5QFW76TKZVNJXJ4H0RV0",
  • "name": "서울"
}

프로필 옵션 조회

프로필 변수에 있는 모든 프로필 옵션의 정보를 생성일 역순으로 조회합니다. 1000 건 단위로 끊어서 프로필 옵션을 조회합니다.

Authorizations:
basic_authentication
path Parameters
profileVariableId
required
string
Example: 01H77A5QFW76TKZVNJXJ4H0RV0
query Parameters
profileVariableOptionId
string

해당 프로필 옵션부터 생성일 역순으로 1000 건씩 조회합니다.

Responses

Response samples

Content type
application/json
{
  • "profileVariableOptions": [
    ],
  • "nextProfileVariableOptionId": "01H8N8RZ0E812VQPHN3ZH14TST"
}

프로필 옵션 수정

프로필 옵션 ID 를 받아 해당 프로필 옵션을 수정합니다. 수정된 프로필 옵션이 반환됩니다.

Authorizations:
basic_authentication
path Parameters
profileVariableId
required
string
Example: 01H77A5QFW76TKZVNJXJ4H0RV0
profileVariableOptionId
required
string
Example: 01H779Z3FQEZ8Q1NPQQ2WNT2JY
Request Body schema: application/json
name
string <= 64 characters

Responses

Request samples

Content type
application/json
{
  • "name": "서울"
}

Response samples

Content type
application/json
{
  • "profileVariableOptionId": "01H779Z3FQEZ8Q1NPQQ2WNT2JY",
  • "profileVariableId": "01H77A5QFW76TKZVNJXJ4H0RV0",
  • "name": "서울"
}

프로필 옵션 삭제

프로필 옵션 ID 를 받아 해당 프로필 옵션을 삭제합니다. 삭제된 프로필 옵션 ID 가 반환됩니다.

Authorizations:
basic_authentication
path Parameters
profileVariableId
required
string
Example: 01H77A5QFW76TKZVNJXJ4H0RV0
profileVariableOptionId
required
string
Example: 01H779Z3FQEZ8Q1NPQQ2WNT2JY

Responses

Response samples

Content type
application/json
"01H779Z3FQEZ8Q1NPQQ2WNT2JY"

응답

응답 조회를 수행합니다.

응답 조회

설문 ID 를 받고, 해당 설문에 대한 응답을 조회합니다. pageToken 기준으로 1000건의 응답씩 응답 역순으로 조회할 수 있습니다.

Authorizations:
basic_authentication
query Parameters
surveyId
required
string
Example: surveyId=a01hb7vt01vpahrwjyxgd28sf3a
startDateTime
string <date-time>
Example: startDateTime=2020-01-01T00:00:00

응답 제출시각 기준으로 조회할 때 범위 시작 시각입니다. (해당 시각 미포함) 값이 없으면 가장 오래된 응답부터 조회합니다.

endDateTime
string <date-time>
Example: endDateTime=2020-01-02T00:00:00

응답 제출시각 기준으로 조회할 때 범위 종료 시각입니다. (해당 시각 포함) 값이 없으면 가장 최근 응답까지 조회합니다.

pageToken
string
Example: pageToken=ZjJrdXJyeWo=

response 에서 받은 pageToken 값을 넣어서 다음 페이지의 응답 1000건을 조회할 수 있습니다.

Responses

Response samples

Content type
application/json
{
  • "surveyId": "a01hb7vt01vpahrwjyxgd28sf3a",
  • "responses": [
    ],
  • "pageToken": "ZjJrdXJyeWo="
}

응답 메타데이터 조회

설문 ID 를 받고, 해당 설문에 대한 응답의 메타데이터를 조회합니다. pageToken 기준으로 1000건의 응답씩 응답 역순으로 조회할 수 있습니다.

Authorizations:
basic_authentication
query Parameters
surveyId
required
string
Example: surveyId=a01hb7vt01vpahrwjyxgd28sf3a
startDateTime
string <date-time>
Example: startDateTime=2020-01-01T00:00:00

응답 제출시각 기준으로 조회할 때 범위 시작 시각입니다. (해당 시각 미포함) 값이 없으면 가장 오래된 응답부터 조회합니다.

endDateTime
string <date-time>
Example: endDateTime=2020-01-02T00:00:00

응답 제출시각 기준으로 조회할 때 범위 종료 시각입니다. (해당 시각 포함) 값이 없으면 가장 최근 응답까지 조회합니다.

pageToken
string
Example: pageToken=ZjJrdXJyeWo=

response 에서 받은 pageToken 값을 넣어서 다음 페이지의 응답 메타데이터 1000건을 조회할 수 있습니다.

Responses

Response samples

Content type
application/json
{
  • "answerSheets": [
    ],
  • "pageToken": "ZjJrdXJyeWo="
}