문화유산 상세

유네스코한국위원회유네스코와유산

  • URL

    http://api.kcisa.kr/openapi/service/rest/other/getUNEN3901

  • 설명

    유네스코한국위원회의 유네스코와 유산정보를 외부 개발자 및 사용자가 이를 활용 할 수 있도록 전달하는 API 서비스입니다. 판소리, 택견 등 다양한 유네스코와 유산의 다양한 정보를 제공합니다.

  • 기관명

    유네스코한국위원회

    갱신주기

    연간

  • 서비스 분야/주체

    API유형

    REST

  • 등록일

    Feb 24, 2015

    활용도

    508

오픈 API

요청인자

요청인자 상세표
변수명 타입 변수설명 필수여부
serviceKey string
서비스키

true
numOfRows string
세션당 요청레코드수

false
pageNo string
페이지수

false

출력 값

출력 값 상세표
No 변수명 출력설명
1 title 자원의 명칭
2 alternativeTitle 대체 (기존 = alternativeTitle(대체) + ' ' + subTitle(부제))
3 creator 주된 책임을 진 개체
4 regDate 등록일
5 collectionDb 소속(통제)DB
6 subjectCategory 기관별주제분류체계
7 subjectKeyword 핵심주제어(키워드)
8 extent 자원의 크기나 재생시간
9 description 내용 (기존 = description(내용) + ' ' + abstract(자원의 대한 요약))
10 spatialCoverage 관련장소 (기존 = spatial(공간) + ' ' + venue(장소))
11 temporal 시간적범위
12 person 사람
13 language 언어
14 sourceTitle 참조자원제목 (기존 = reference(참조한자원) + ' ' + source(유래자원에 대한 참조))
15 referenceIdentifier 참조식별정보(썸네일이미지)
16 rights 자원에 대한 권리
17 copyrightOthers 저작권
18 url 지식정보자원위치정보
19 contributor 기여자
20 temporalCoverage 해당시간대 (기존 = period(기간) + ' ' + time(시간))
21 charge 요금 정보
22 grade 등급 정보

메시지 설명

메시지 설명 상세표
0000 정상 처리
F2013 서비스 주소 호출 실패
9999 서비스 점검중(내부 서비스 호출 장애)

활용 명세

샘플 데이터

>샘플 데이터 상세

샘플코드

/* Java Sample */
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.io.BufferedReader;
import java.io.IOException;

public class openApi {
public static void main(String[] args) throws IOException {

StringBuilder urlBuilder = new StringBuilder("http://api.kcisa.kr/openapi/service/rest/other/getUNEN3901"); /*URL*/
urlBuilder.append("?" + URLEncoder.encode("serviceKey","UTF-8") + "=서비스키"); /*서비스키*/
urlBuilder.append("&" + URLEncoder.encode("numOfRows","UTF-8") + "=" + URLEncoder.encode("세션당 요청레코드수", "UTF-8")); /*세션당 요청레코드수*/
urlBuilder.append("&" + URLEncoder.encode("pageNo","UTF-8") + "=" + URLEncoder.encode("페이지수", "UTF-8")); /*페이지수*/

URL url = new URL(urlBuilder.toString());
HttpURLConnection conn = (HttpURLConnection) url.openConnection();

conn.setRequestMethod("GET");
conn.setRequestProperty("Content-type", "application/json");
System.out.println("Response code: " + conn.getResponseCode());

BufferedReader rd;
if(conn.getResponseCode() >= 200 && conn.getResponseCode() <= 300) {

rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));

} else {

rd = new BufferedReader(new InputStreamReader(conn.getErrorStream()));

}

StringBuilder sb = new StringBuilder();
String line;
while ((line = rd.readLine()) != null) {

sb.append(line);

}
rd.close();
conn.disconnect();
System.out.println(sb.toString());

}

}
/* Javascript Sample*/
var xhr = new XMLHttpRequest();
var url = 'http://api.kcisa.kr/openapi/service/rest/other/getUNEN3901'; /*URL*/
var queryParams = '?' + encodeURIComponent('serviceKey') + '=' + '서비스키'; /*서비스키*/
queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('세션당 요청레코드수'); /*세션당 요청레코드수*/
queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('페이지수'); /*페이지수*/

xhr.open('GET', url + queryParams);
xhr.onreadystatechange = function () {
if (this.readyState == 4) {

console.log('status: ' + this.status);
console.log('resultCode: ' + $(this.responseText).find('resultCode').text());
console.log('resultMsg: ' + $(this.responseText).find('resultMsg').text());

var item = $(this.responseText).find('item');
$(item).each(function(){

console.log("title" + $(this).find("title").text());
console.log("alternativeTitle" + $(this).find("alternativeTitle").text());
console.log("creator" + $(this).find("creator").text());
console.log("regDate" + $(this).find("regDate").text());
console.log("collectionDb" + $(this).find("collectionDb").text());
console.log("subjectCategory" + $(this).find("subjectCategory").text());
console.log("subjectKeyword" + $(this).find("subjectKeyword").text());
console.log("extent" + $(this).find("extent").text());
console.log("description" + $(this).find("description").text());
console.log("spatialCoverage" + $(this).find("spatialCoverage").text());
console.log("temporal" + $(this).find("temporal").text());
console.log("person" + $(this).find("person").text());
console.log("language" + $(this).find("language").text());
console.log("sourceTitle" + $(this).find("sourceTitle").text());
console.log("referenceIdentifier" + $(this).find("referenceIdentifier").text());
console.log("rights" + $(this).find("rights").text());
console.log("copyrightOthers" + $(this).find("copyrightOthers").text());
console.log("url" + $(this).find("url").text());
console.log("contributor" + $(this).find("contributor").text());
console.log("temporalCoverage" + $(this).find("temporalCoverage").text());
console.log("charge" + $(this).find("charge").text());
console.log("grade" + $(this).find("grade").text());

});

};

}
xhr.send('');