양식 단건 조회
양식 단건 조회 (GET)
특정 인증서 양식을 조회합니다.
- Method:
GET
- URL:
/achievements/forms/{achievementFormId}
- URL Parameter:
achievementFormId
(number, 필수): 인증서 양식 ID
Response
{
"statusCode": 200,
"message": "인증서 양식이 조회되었습니다.",
"achievement": {인증서 양식 데이터 객체}
}
achievementForm (object)
필드명 | 타입 | 설명 |
---|---|---|
id | number | 인증서 양식의 고유 ID |
name | string | 인증서 양식 제목 |
description | string | 인증서 양식 설명 |
type | "completion" | "activity" | "license" | "career" | "award" | "recommendation" | "membership" | "degree" | 인증서 양식 타입 |
tags | string[] | 인증서 양식 관련 태그 |
prefix | string | 인증서 고유 번호 접두어 |
program_type | string | 프로그램 유형 |
program_name | string | 프로그램 이름 |
program_url | string | 프로그램 URL |
course_begin_at | string (ISO8601) | 강의 시작 날짜 |
course_end_at | string (ISO8601) | 강의 종료 날짜 |
created_at | string (ISO8601) | 인증서 양식 생성일 |
updated_at | string (ISO8601) | 인증서 양식 마지막 수정일 |
club | club (object) | 발급기관 정보 |
clubInstitutions | clubInstitutions (object) | 발급기관 정보 |
representativeInstitution | representativeInstitution (object) | 대표발급기관 정보 |
requirements | requirements (object) | 취득성과 정보 |
achievementCertificateDesign | achievementCertificateDesign (object) | certificate 디자인 정보 객체 |
achievementBadgeDesign | achievementBadgeDesign (object) | badge 디자인 정보 객체 |
achievementForm.club (object)
필드명 | 타입 | 설명 |
---|---|---|
domain | string | 클럽의 도메인 |
customData | object[] | 클럽이 정의한 커스텀 데이터 목록 |
customData[].attribute_name | string | 커스텀 데이터 이름 |
customData[].attribute_tag | string | 커스텀 데이터 태그 |
achievementForm.clubInstitutions (object[])
필드명 | 타입 | 설명 |
---|---|---|
type | string | 기관 유형 (공공기관, 기업, 학교 등) |
name | string | 기관 이름 |
website_url | string | 기관 웹사이트 URL |
images | object[] | 기관 이미지 리스트 |
images[].path | string | 이미지 파일 URL |
images[].type | "club_symbol" | "sign_image" | "club_logo" | 이미지 타입 |
achievementForm.representativeInstitution (object)
필드명 | 타입 | 설명 |
---|---|---|
type | string | 대표 기관 유형 |
name | string | 대표 기관 이름 |
website_url | string | 대표 기관 웹사이트 URL |
images | object[] | 대표 기관 이미지 리스트 |
images[].path | string | 이미지 파일 URL |
images[].type | "club_symbol" | "sign_image" | "club_logo" | 이미지 타입 |
achievementForm.requirements (object[])
필드명 | 타입 | 설명 |
---|---|---|
type | "submit_homework" | "offline_meet" | "watch_video" | "live_meet" | "read" | "test" | "project" | "etc" | 취득 조건 타입 |
url | string | 관련 링크 |
description | string | 요구사항 설명 |
achievementForm.achievementCertificateDesign (object)
필드명 | 타입 | 설명 |
---|---|---|
id | number | certificate 디자인의 고유 ID |
name | string | 디자인 이름 |
main_color | string | null | 메인 색상 |
sub_color | string | null | 서브 색상 |
extra_color_1 | string | null | 보조 색상1 |
extra_color_2 | string | null | 보조 색상2 |
layout_json | object[] | 인증서 이미지 생성을 위한 디자인 JSON 배열 |
template_type | string | 사용된 템플릿 종류 |
created_at | string (ISO8601) | 디자인 생성일 |
updated_at | string (ISO8601) | 디자인 수정일 |
achievementForm.achievementBadgeDesign (object)
필드명 | 타입 | 설명 |
---|---|---|
id | number | badge 디자인의 고유 ID |
name | string | 디자인 이름 |
main_color | string | null | 메인 색상 |
sub_color | string | null | 서브 색상 |
extra_color_1 | string | null | 보조 색상1 |
extra_color_2 | string | null | 보조 색상2 |
layout_json | object[] | 인증서 이미지 생성을 위한 디자인 JSON 배열 |
template_type | string | 사용된 템플릿 종류 |
created_at | string (ISO8601) | 디자인 생성일 |
updated_at | string (ISO8601) | 디자인 수정일 |
오류 코드
상태 코드 | 에러 | 메시지 | 상세 설명 |
---|---|---|---|
400 | BadRequest | 잘못된 요청입니다. | 허가되지 않은 값, 올바르지 않은 형식의 요청 |
401 | Unauthorized | Invalid token | 인증 정보가 올바르지 않은 경우 |
404 | AchievementsNotFound | 해당 인증서 양식을 찾을 수 없습니다. | 인증서 목록 조회에 실패했을 경우 |
500 | InternalServerError | 예기치 않은 오류가 발생했습니다. | 서버 에러 |
Request Sample
- Java
- JavaScript
- Python
- Shell
- Unirest
- OkHttp
String url = "https://${baseURL}/open-api/achievements/forms/" + achievementFormId;
HttpResponse<String> response = Unirest.get(url)
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("Authorization", "Bearer " + apiKey)
.asString();
System.out.println("Status: " + response.getStatus());
System.out.println("Response: " + response.getBody());
OkHttpClient client = new OkHttpClient();
String url = "https://${baseURL}/open-api/achievements/forms/" + achievementFormId;
Request request = new Request.Builder()
.url(url)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + apiKey)
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Status: " + response.code());
System.out.println("Response: " + response.body().string());
} catch (Exception e) {
e.printStackTrace();
}
- Axios
- XMLHttpRequest
- Fetch
- HTTP
const axios = require("axios");
const url = `https://api.test.kolleges.net/open-api/achievements/forms/${achievementFormId}`;
axios
.get(url, {
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${apiKey}`,
},
})
.then((response) => {
console.log("Status:", response.status);
console.log("Response:", response.data);
})
.catch((error) => {
console.error(
"Error:",
error.response ? error.response.data : error.message
);
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
const url = `https://api.test.kolleges.net/open-api/achievements/forms/${achievementFormId}`;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log("Response:", this.responseText);
}
});
xhr.open("GET", url);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer " + apiKey);
xhr.send();
const fetch = require("node-fetch");
const url = `https://api.test.kolleges.net/open-api/achievements/forms/${achievementFormId}`;
fetch(url, {
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${apiKey}`,
},
})
.then((response) => {
console.log("Status:", response.status);
return response.json();
})
.then((data) => {
console.log("Response:", data);
})
.catch((error) => console.error("Error:", error));
const https = require("https");
const options = {
method: "GET",
hostname: "api.test.kolleges.net",
path: `/open-api/achievements/forms/${achievementFormId}`,
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${apiKey}`,
},
};
const req = https.request(options, (res) => {
const chunks = [];
res.on("data", (chunk) => {
chunks.push(chunk);
});
res.on("end", () => {
const body = Buffer.concat(chunks).toString();
console.log("Status:", res.statusCode);
console.log("Response:", body);
});
});
req.on("error", (error) => {
console.error("Error:", error);
});
req.end();
- Requests
import requests
url = f"https://${baseURL}/open-api/achievements/forms/{achievement_form_id}"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": f"Bearer {api_key}"
}
response = requests.get(url, headers=headers)
print("Status:", response.status_code)
try:
print("Response:", response.json())
except Exception as e:
print("Response:", response.text)
- cURL
curl -X GET "https://${baseURL}/open-api/achievements/forms/${achievementFormId}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $API_KEY"