과제
과제는 교육의 일부분(카테고리, 모듈, 주제, 과정 또는 시나리오)을 사용자, 팀 또는 조직 전체에 마감일과 함께 연결합니다. 동일한 레코드가 SARIF 자동 할당 플로우를 백업합니다. 모든 엔드포인트는 /api/public/v1/assignments 아래에 있습니다.
엔드포인트
| Method | Path | Scope | 용도 |
|---|---|---|---|
| GET | /assignments | assignments:read | 누적 진행 상황과 함께 과제 목록 조회. |
| GET | /assignments/{'{'}id{'}'} | assignments:read | 사용자별 진행 상황을 포함한 단일 과제. |
| POST | /assignments | assignments:write | 과제 생성. assignment.created를 발사합니다. |
| PATCH | /assignments/{'{'}id{'}'} | assignments:write | 마감일, 필수 플래그, 메모 또는 활성 상태 업데이트. |
| DELETE | /assignments/{'{'}id{'}'} | assignments:write | 비활성화. 진행 상황 레코드는 보존됩니다. |
수신자 및 콘텐츠 용어
모든 과제는 assigneeType + assigneeId 쌍과 contentArea + targetType + targetId 트리플을 가집니다. 법적 값:
| 필드 | 법적 값 | targetId / assigneeId의 의미 |
|---|---|---|
assigneeType | user, team, org | user와 team의 경우 assigneeId는 해당 UUID입니다. org의 경우 id는 조직 id입니다. |
contentArea | practice, learn | practice는 실습 챌린지입니다. learn은 과정과 시나리오입니다. |
practice용 targetType | category, module, topic | 문자열 슬러그, 예: web, owasp-top-10, sql-injection. |
learn용 targetType | course, scenario | 문자열 슬러그, 예: owasp-top-10-2025, phishing-call-2025. |
두 영역 모두에 대한 targetType | custom-course | 맞춤형 과정의 UUID(맞춤형 과정 참조). 과정의 항목이 완료를 위해 추적되는 연습 주제 및/또는 학습 시나리오를 결정합니다. |
과제 목록 조회
조직의 모든 과제를 활성 및 비활성 상태로, 비정규화된 진행 상황 합계와 함께 반환합니다.
GET /api/public/v1/assignments
Authorization: Bearer scs_live_…응답
[
{
"id": "d7c8a1b2-3e45-4f67-89ab-cd0123456789",
"contentArea": "practice",
"assigneeType": "team",
"assigneeId": "4f8d3e2a-71cb-4d09-9ad7-5b8c7e1f0a32",
"assigneeName": "Payments",
"targetType": "topic",
"targetId": "sql-injection",
"targetTitle": "SQL Injection",
"deadline": "2026-06-12T23:59:59Z",
"isMandatory": true,
"isActive": true,
"isOverdue": false,
"avgProgress": 42.5,
"totalAssignees": 12,
"completedAssignees": 3,
"createdAt": "2026-05-29T08:00:00Z"
}
]예시
curl -sS -H "Authorization: Bearer $SCH_API_KEY" \
https://api.limeplate.com/api/public/v1/assignments과제 가져오기
목록 항목과 동일한 필드에 더해 할당자의 표시 이름, 선택적 메모 및 컴플라이언스 보고서에 적합한 사용자별 진행 상황 배열.
GET /api/public/v1/assignments/{assignmentId}
Authorization: Bearer scs_live_…응답
{
"id": "d7c8a1b2-3e45-4f67-89ab-cd0123456789",
"contentArea": "practice",
"assigneeType": "team",
"assigneeId": "4f8d3e2a-71cb-4d09-9ad7-5b8c7e1f0a32",
"assigneeName": "Payments",
"targetType": "topic",
"targetId": "sql-injection",
"targetTitle": "SQL Injection",
"deadline": "2026-06-12T23:59:59Z",
"isMandatory": true,
"isActive": true,
"isOverdue": false,
"note": "Follow-up to the May audit finding.",
"assignedByName": "API Key: CI Ingestion",
"avgProgress": 42.5,
"totalAssignees": 12,
"completedAssignees": 3,
"createdAt": "2026-05-29T08:00:00Z",
"userProgress": [
{
"userId": "b1a4d7c2-9e58-4f3a-83cd-2c6f1a90e7b4",
"name": "Jane Smith",
"email": "jane.smith@acme.com",
"totalChallenges": 8,
"completedChallenges": 8,
"progressPercent": 100,
"completedAt": "2026-06-04T10:18:42Z",
"isOverdue": false
}
]
}예시
curl -sS -H "Authorization: Bearer $SCH_API_KEY" \
https://api.limeplate.com/api/public/v1/assignments/d7c8a1b2-3e45-4f67-89ab-cd0123456789과제 생성
과제를 생성하고 assignment.created를 발사합니다. 수신자가 팀이나 조직인 경우, 사용자별 진행 상황 행이 생성 시점에 모든 구성원에 대해 구체화되므로, GET /assignments/{id}의 응답이 즉시 완료됩니다.
POST /api/public/v1/assignments
Authorization: Bearer scs_live_…
Content-Type: application/json요청 본문
| 필드 | Type | 필수 | 의미 |
|---|---|---|---|
assigneeType | string | 예 | user, team 또는 org. |
assigneeId | uuid | 예 | 유형에 따라 사용자 id, 팀 id 또는 조직 id. |
contentArea | string | 예 | practice 또는 learn. |
targetType | string | 예 | 위의 용어 표 참조. |
targetId | string | 예 | 카테고리, 모듈, 주제, 과정 또는 시나리오의 슬러그 또는 id. |
deadline | ISO 8601 | 예 | UTC 마감 날짜 및 시간. |
isMandatory | bool | 아니오 | 기본값은 true. 비필수 과제는 컴플라이언스 보고서를 차단하지 않습니다. |
note | string | 아니오 | 대시보드에서 수신자에게 표시되는 자유 텍스트. |
응답
{
"id": "d7c8a1b2-3e45-4f67-89ab-cd0123456789",
"contentArea": "practice",
"assigneeType": "team",
"assigneeId": "4f8d3e2a-71cb-4d09-9ad7-5b8c7e1f0a32",
"assigneeName": "Payments",
"targetType": "topic",
"targetId": "sql-injection",
"targetTitle": "SQL Injection",
"deadline": "2026-06-12T23:59:59Z",
"isMandatory": true,
"isActive": true,
"isOverdue": false,
"avgProgress": 0,
"totalAssignees": 12,
"completedAssignees": 0,
"createdAt": "2026-05-29T08:00:00Z"
}예시
curl -sS -X POST \
-H "Authorization: Bearer $SCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assigneeType": "team",
"assigneeId": "4f8d3e2a-71cb-4d09-9ad7-5b8c7e1f0a32",
"contentArea": "practice",
"targetType": "topic",
"targetId": "sql-injection",
"deadline": "2026-06-12T23:59:59Z",
"isMandatory": true,
"note": "Follow-up to the May audit finding."
}' \
https://api.limeplate.com/api/public/v1/assignments과제 업데이트
deadline, isMandatory, note 및 isActive의 모든 부분 집합을 보낼 수 있습니다. 생략된 필드는 그대로 유지됩니다. DELETE에 대한 비파괴적 등가물로 isActive: false를 사용하세요.
PATCH /api/public/v1/assignments/{assignmentId}
Authorization: Bearer scs_live_…
Content-Type: application/json요청 본문
| 필드 | Type | 의미 |
|---|---|---|
deadline | ISO 8601 | 새 마감 날짜. |
isMandatory | bool | 필수 플래그 전환. |
note | string | 메모 교체. 지우려면 빈 문자열을 보내세요. |
isActive | bool | 진행 상황에 영향을 주지 않고 활성화 또는 비활성화. |
응답
{
"message": "Assignment updated"
}예시
curl -sS -X PATCH \
-H "Authorization: Bearer $SCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deadline": "2026-06-26T23:59:59Z",
"note": "Extended after sprint planning."
}' \
https://api.limeplate.com/api/public/v1/assignments/d7c8a1b2-3e45-4f67-89ab-cd0123456789과제 비활성화
isActive를 false로 설정합니다. 과제는 더 이상 수신자의 "내 과제" 보기에 나타나지 않으며 컴플라이언스 메트릭에 기여하는 것을 중단하지만, 과거 진행 상황 레코드는 보존되어 과거 기간에 대한 보고서가 여전히 해결됩니다.
DELETE /api/public/v1/assignments/{assignmentId}
Authorization: Bearer scs_live_…응답
{
"message": "Assignment deactivated"
}예시
curl -sS -X DELETE \
-H "Authorization: Bearer $SCH_API_KEY" \
https://api.limeplate.com/api/public/v1/assignments/d7c8a1b2-3e45-4f67-89ab-cd0123456789웹훅 이벤트
POST /assignments를 통해 과제를 생성하면 assignment.created가 한 번 발사됩니다. 단일 수신자가 기본 대상에서 100% 진행 상황에 도달하면 해당 사용자에 대해 assignment.completed가 발사됩니다 — 팀 및 조직 과제의 경우 이는 전체 과제에 대한 한 이벤트가 아니라 100%에 도달한 구성원당 하나의 이벤트를 의미합니다. 두 이벤트 모두 과제 id와 수신자 identity를 포함합니다. /docs/api/webhooks를 통해 구독하고 서명을 검증하세요.