コース
コースの一覧・詳細と、プレイヤーのコース記録を取得するAPI、およびコースを作成・更新するAPIです。
GET /v1/courses
Section titled “GET /v1/courses”削除済みを除く全コースを、コースクラスと公式IDの順で取得します。
リクエスト:
GET /v1/coursesAuthorization: Bearer <APIトークン>レスポンス: 200 OK
{ "courses": [ { "id": "7d5f5c42b9a8e301", "idx": "50020", "name": "クラス認定 Ⅲ", "class": "3" } ]}| フィールド | 型 | 説明 |
|---|---|---|
courses |
array | コース情報の配列 |
courses[].id |
string | コースのID(16文字の小文字16進数) |
courses[].idx |
string | 公式ID |
courses[].name |
string | コース名 |
courses[].class |
string | コースクラス(1~5、inf、extra) |
GET /v1/courses/:id
Section titled “GET /v1/courses/:id”指定されたコースの詳細を取得します。
リクエスト:
GET /v1/courses/7d5f5c42b9a8e301Authorization: Bearer <APIトークン>パスパラメータ:
| パラメータ | 型 | 説明 |
|---|---|---|
id |
string | コースのID(16文字の小文字16進数) |
レスポンス: 200 OK
{ "id": "7d5f5c42b9a8e301", "idx": "50020", "name": "クラス認定 Ⅲ", "class": "3"}フィールドの詳細は GET /v1/courses を参照してください。
エラー:
| コード | HTTP | 説明 |
|---|---|---|
validation_failed |
422 | id の形式が不正です |
not_found |
404 | 指定されたコースが見つかりません |
GET /v1/users/:username/records/courses
Section titled “GET /v1/users/:username/records/courses”指定されたユーザーのコースレコードを取得します。未プレイのコースも常に補完して返します(is_played が false、score が 0、updated_at が null)。追加のクエリパラメータは不要です。
プライバシーについて: 非公開設定のユーザーは、本人または承認済みフレンド以外からのリクエストに対して 404 Not Found を返します。
リクエスト:
GET /v1/users/kjumanenobikto/records/coursesAuthorization: Bearer <APIトークン>パスパラメータ:
| パラメータ | 型 | 説明 |
|---|---|---|
username |
string | 対象ユーザー名 |
レスポンス: 200 OK
{ "updated_at": "2026-07-14T15:30:00+09:00", "courses": [ { "id": "7d5f5c42b9a8e301", "idx": "50020", "name": "クラス認定 Ⅲ", "class": "3", "is_played": true, "score": 3012345, "is_clear": true, "combo_lamp": "FULL COMBO", "updated_at": "2026-07-13T20:12:34+09:00" }, { "id": "2a1076c9e51f84bd", "idx": "50021", "name": "クラス認定 Ⅳ", "class": "4", "is_played": false, "score": 0, "is_clear": false, "combo_lamp": null, "updated_at": null } ]}| フィールド | 型 | 説明 |
|---|---|---|
updated_at |
string | null | コースマスタまたは対象ユーザーのコースレコードの最終更新日時のうち新しい方。どちらも存在しない場合は null |
courses |
array | コースレコードの配列。プレイヤー未連携の場合は空配列 |
courses[].id |
string | コースのID(16文字の小文字16進数) |
courses[].idx |
string | 公式ID |
courses[].name |
string | コース名 |
courses[].class |
string | コースクラス(1~5、inf、extra) |
courses[].is_played |
boolean | プレイ済みかどうか |
courses[].score |
number | コーススコア(未プレイの場合は 0) |
courses[].is_clear |
boolean | クリア済みかどうか |
courses[].combo_lamp |
string | null | コンボランプ。未設定または NONE の場合は null |
courses[].updated_at |
string | null | レコード更新日時。未プレイの場合は null |
エラー:
| コード | HTTP | 説明 |
|---|---|---|
user_not_found |
404 | ユーザーが見つからない、または非公開設定のため閲覧できません |
POST /v1/courses
Section titled “POST /v1/courses”新しいコースを作成します。コースの id はサーバーが発行します。
権限: read_write トークン、および ADMIN
仕様を表示
リクエスト:
POST /v1/coursesAuthorization: Bearer <APIトークン>Content-Type: application/json{ "idx": "50020", "name": "クラス認定 Ⅲ", "class": "3"}| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
idx |
string | ✓ | 公式ID(最大32文字)。既存コースと重複不可 |
name |
string | ✓ | コース名(最大255文字) |
class |
string | ✓ | コースクラス(1~5、inf、extra。最大16文字) |
レスポンス: 201 Created
作成したコースオブジェクトを返します。形式は GET /v1/courses/:id と同じです。
エラー:
| コード | HTTP | 説明 |
|---|---|---|
bad_request |
400 | JSONの形式が不正、または未対応のフィールドが含まれています |
forbidden |
403 | read_write トークンと ADMIN 権限が必要です |
duplicate_official_idx |
409 | 公式IDが既存コースと重複しています |
validation_failed |
422 | 必須項目、文字数、コースクラスなどが不正です |
PUT /v1/courses/:id
Section titled “PUT /v1/courses/:id”既存コースの名称とクラスを更新します。公式ID(idx)は変更できません。
権限: read_write トークン、および EDITOR または ADMIN
仕様を表示
リクエスト:
PUT /v1/courses/7d5f5c42b9a8e301Authorization: Bearer <APIトークン>Content-Type: application/json{ "name": "クラス認定 Ⅲ", "class": "3"}パスパラメータ:
| パラメータ | 型 | 説明 |
|---|---|---|
id |
string | コースのID(16文字の小文字16進数) |
name と class はどちらも必須です。値の制約は POST /v1/courses と同じです。
レスポンス: 200 OK
更新したコースオブジェクトを返します。形式は GET /v1/courses/:id と同じです。
エラー:
| コード | HTTP | 説明 |
|---|---|---|
bad_request |
400 | JSONの形式が不正、または未対応のフィールドが含まれています |
forbidden |
403 | read_write トークンと EDITOR / ADMIN 権限が必要です |
not_found |
404 | 指定されたコースが見つかりません |
validation_failed |
422 | id、必須項目、文字数、コースクラスなどが不正です |