課題
課題は、トレーニングの一部 (カテゴリ、モジュール、トピック、コース、シナリオ) を、ユーザー、チーム、または組織全体に期限とともに紐づけます。同じレコードがSARIF自動割り当てフローも支えます。すべてのエンドポイントは/api/public/v1/assignments下にあります。
エンドポイント
| メソッド | パス | スコープ | 目的 |
|---|---|---|---|
| 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リクエストボディ
| フィールド | タイプ | 必須 | 意味 |
|---|---|---|---|
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リクエストボディ
| フィールド | タイプ | 意味 |
|---|---|---|
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-cd0123456789Webhookイベント
POST /assignments経由で課題を作成すると、assignment.createdが一度発火します。単一の受領者が基礎ターゲットで100%進捗に達すると、そのユーザーに対してassignment.completedが発火します — チームと組織の課題の場合、これは100%に達するメンバーごとに1イベントを意味し、課題全体に対して1イベントではありません。両方のイベントには課題IDと受領者アイデンティティが含まれます。/docs/api/webhooks経由で購読し、署名を検証してください。