@조상준
지원자가 지원서를 작성하고 제출 버튼을 누른다.(데이터: 이름, 이메일, 개인정보 답변, 사전질문 답변, 질문 답변)

이미지 파일 저장을 위한, API 요청: api/v2/files/presigned-url를 통해 presigned-url 받기.
만약 지원자가 작성한, 개인정보답변에 지원자 프로필이 있거나, 질문의 답변 중에 file혹은 이미지가 있다면, 먼저 각각의 이미지를 https://api.ssoc.kr/api/v2/files/presigned-url 로 요청을 보내, 이미지들 저장을 위한 presigned-url 을 받는다.
// 예시1. 지원자 프로필의 경우
curl -X 'POST' \
'<https://api.ssoc.kr/api/v2/files/presigned-url>' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "지원자_조상준.png",
"fileType": "APPLICATION_PROFILE",
"contentType": "image/png"
}'
curl -X 'POST' \
'<https://api.ssoc.kr/api/v2/files/presigned-url>' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "조상준_지원서과제.pdf",
"fileType": "ANSWER_ATTACHMENT",
"contentType": "file/pdf"
}'
200 OK
{
"presignedUrl": "https://ryc-***-***.s3.***.amazonaws.com/***/***/***.png?X-Amz-Algorithm=***&X-Amz-Date=***&X-Amz-SignedHeaders=***&X-Amz-Expires=600&X-Amz-Credential=***&X-Amz-Signature=***",
"fileMetadataId": "699b6e9c-1358-4a50-a4fd-09188c06533a"
}
presignedUrl로 이미지 저장하기
이미지 파일 저장 후 확인 API 요청: /api/v2/files/confirm-upload로 정상적으로 S3에 저장되었는지 확인하기/서버와 동기화 하기 위함
이미지/파일을 저장한 후 /api/v2/files/confirm-upload로 요청을 보내, S3에 정상적으로 저장되었는지 확인한다. 이때 1번에서 받았던 fileMetadataId로 요청을 보낸다.
curl -X 'POST' \
'<https://api.ssoc.kr/api/v2/files/confirm-upload>' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"fileMetadataId": "699b6e9c-1358-4a50-a4fd-09188c06533a"
}'
200 OK
응답 데이터 별도로 없음.
{
"code": "FILE_NOT_FOUND_AT_S3",
"message": "***/****/***.png is not found at S3."
}
지원서 데이터 저장 API 요청: api/v2/announcements/{announcement-id}/applications
이제 이미지/파일의 메타데이터 id를 기반으로 이미지,파일의 값을 대입하여 지원서 요청을 보내면 된다.
요청 예시 이해하기 참고:
지원자 이름/이메일은 모든 공고에서 필수항목이다. 다만, 공고에 따라 personalInfos 3개중 여러개를 선택하여 필수항목으로 지정할 수 있다.
따라서 아래 요청 예시의 공고 d3f1c5e2-8a90-4b6c-9c45-6d2a1c8e5d3f는 personalInfos인 휴대폰번호/지원자사진/학번을 필수로 받는 공고이다.
또한 각 질문의 타입과 해당 타입의 answers의 필수응답필드는 다음과 같다.
"questionId": "string", "fileMetadataId": "string""questionId": "string" ,"textAnswer": "string""questionId": "string" ,"textAnswer": "string""questionId": "string","answerChoices": [ { "optionId": "string” },{ "optionId": "string” } ] (이때, answerChoices의 배열원소의 개수는 1개 이상이다.)
"answerChoices": [ { "optionId": "string” }](이때, answerChoices의 배열원소의 개수는 반드시 1개이다.)요청 예시: 엔샵 백엔드 모집공고(d3f1c5e2-8a90-4b6c-9c45-6d2a1c8e5d3f)에 지원자 조상준 지원서 제출
curl -X 'POST' \
'<https://api.ssoc.kr/api/v2/announcements/d3f1c5e2-8a90-4b6c-9c45-6d2a1c8e5d3f/applications>' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"applicant": {
"email": "[email protected]",
"name": "조상준",
"personalInfos": [
{
"personalInfoQuestionType": "PHONE_NUMBER",
"value": "010-0000-0000"
},
{
"personalInfoQuestionType": "PROFILE_IMAGE",
"value": "699b6e9c-1358-4a50-a4fd-09188c06533a" //위의 메타데이터ID!
},
{
"personalInfoQuestionType": "STUDENT_ID",
"value": "20011609"
}
]
},
"application": {
"answers": [
{
"questionId": "3f66f91b-5c77-4c6f-82aa-1c826cb18187",
"textAnswer": "안녕하세요 엔샵에 지원하게 된 세종대학교 컴퓨터 공학과 학부생 조상준입니다. 열심히 할 자신 있습니다!"
},{
"questionId": "a949f935-4d65-4e20-8669-7f2e987a9e59",
"textAnswer": "서버 개발자에 관심이 있으며, 스프링부터 개발에 자신있습니다!"
},{
"questionId": "702f24f7-dbc1-41d3-a746-7c3fe327e3e4",
"textAnswer": "ATS 서비스를 만들어보고 싶습니다."
},{
"questionId": "65e88f84-f91b-401e-b2a1-bb8724e8a1e3",
"answerChoices": [
{
"optionId": "7eecf8a3-95cb-42e6-9e07-9c1bbd167d3f"
},{
"optionId": "3b6eb089-b2e3-4a5d-a1f4-1b22dc35fc1f"
}
]
},{
"questionId": "c41e83c1-67a3-46de-a70d-88f7f78a9c43",
"answerChoices": [
{
"optionId": "b7d3b77b-b646-470c-a7cb-7a1d0c022aac"
}
]
},{
"questionId": "aefb95a5-3d92-4e8f-b132-2e45f9e780cc",
"answerChoices": [
{
"optionId": "f76e6b7a-2378-4e08-a8ee-5c4faeb262b9"
}
]
},{
"questionId": "f4410ce9-1880-4536-a5db-689cb69a1b73",
"textAnswer": "정보처리기사"
},{
"questionId": "c347bf00-2b69-42ef-9e77-1c04ef84be55",
"textAnswer": "토익 900점"
}
]
}
}'
{
"applicantId": "a0df350f-9204-453a-96a2-c54be178709c",
"applicationId": "7c99a185-a7c4-41e4-b1dc-e28bd2b20eb1"
}