양식 다건 조회
양식 다건 조회 (GET)
인증서 양식의 목록을 조회합니다.
- Method:
GET
- URL:
/achievements/forms
- Query Parameters:
파라미터 타입 필수 기본값 설명 page
number No 1 페이지 번호 pageSize
number No 15 페이지 당 항목 수
Response
{
"statusCode": 200,
"message": "인증서 양식 목록이 조회되었습니다.",
"achievements": [인증서 양식 데이터 객체],
"totalPages": 1
}
achievementForms (배열)
필드명 | 타입 | 설명 |
---|---|---|
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) | 인증서 양식 마지막 수정일 |
achievementCertificateDesign | achievementCertificateDesign (object) | certificate 디자인 정보 객체 |
achievementBadgeDesign | achievementBadgeDesign (object) | badge 디자인 정보 객체 |
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 | Page must be a positive number | 페이지 번호가 양의 정수가 아닌 경우 |
400 | BadRequest | Page must not be less than 1 | 페이지 번호가 1보다 작을 경우 |
400 | BadRequest | PageSize must be a positive number | 페이즈 사이즈가 양의 정수가 아닌 경우 |
400 | BadRequest | PageSize must not be less than 1 | 페이지 사이즈가 1보다 작을 경우 |
400 | BadRequest | Page size cannot exceed 15 | 페이지 사이즈가 15를 초과했을 경우 |
401 | Unauthorized | Invalid token | 인증 정보가 올바르지 않은 경우 |
404 | AchievementsNotFound | 해당 인증서 양식을 찾을 수 없습니다. | 인증서 목록 조회에 실패했을 경우 |
500 | InternalServerError | 예기치 않은 오류가 발생했습니다. | 서버 에러 |
Request Sample
- Java
- JavaScript
- Python
- Shell
- Unirest
- OkHttp
String url = "https://${baseURL}/open-api/achievements/forms";
HttpResponse<String> response = Unirest.get(url + queryParams)
.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 baseUrl = "https://${baseURL}/open-api/achievements/forms";
String url = baseUrl + queryParams;
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`;
axios
.get(url + queryParams, {
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 baseUrl = `https://api.test.kolleges.net/open-api/achievements/forms`;
const url = baseUrl + queryParams;
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`;
fetch(url + queryParams, {
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${queryParams}`,
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"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": f"Bearer {api_key}"
}
response = requests.get(url + queryParams, 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?page=1&pageSize=10" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $API_KEY"