本文へ移動
Bounty Developer

GET/api/v1/boshu/form-modules

「BOSHU の外部 API」の分類の、情報を読み出す API。ログインした本人として呼ぶ。

要約

置ける共通モジュールの棚(全イベント共通 + callId の募集のイベント、または eventId のイベント(イベントの管理者以上)。行き先に募集を含むものだけ)

呼び方と印

ログイン・レート制限

短い時間に呼びすぎると断られる API(レート制限)。断られたら Retry-After の秒数を待って呼び直す。

URL に付ける値(パラメータ)

経路の中の波かっこの部分と、URL の ? の後ろに付ける値。「必須」の印があるものは省けない。

  • callIdquery任意string(uuid)
  • eventIdquery任意string(uuid)

返るもの(応答)200 · application/json

成功したときに返る形。入れ子の欄は、その行を押すと開く・閉じる。「任意」の印がある欄は返らないことがある。

  • callIdstring(uuid) | null
  • eventIdstring(uuid) | null
  • modulesarray<object>件数 ≤500
    • idstring(uuid)
    • keystring
    • scope"platform" | "event"
    • eventIdstring(uuid) | null
    • destinationsarray<string>
    • revisioninteger
    • titlestring
    • helpstring | null
    • questionsarray<object>
      • idstring
      • typestring
      • labelstring
      • requiredboolean
    • archivedboolean
    • usageobject
      • scope"all" | "managed_calls"
      • draftPagesinteger≥0
      • latestVersionsinteger≥0
      • callsobject
        • draftinteger≥0
        • publishedinteger≥0
        • closedinteger≥0
      • eventQuestionnairesinteger≥0
    • placedboolean | null

失敗したとき(エラー)

失敗したときの状態コードと、その意味。本文の error の値で、プログラムが失敗の種類を見分けられる。

  • 400HTTP 400(x-bounty-error-codes を参照)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403HTTP 403(x-bounty-error-codes を参照)
  • 404HTTP 404(x-bounty-error-codes を参照)
  • 428HTTP 428(x-bounty-error-codes を参照)
  • 429レート制限(Retry-After 付き)
  • 503HTTP 503(x-bounty-error-codes を参照)
  • invalid_token
  • forbidden
  • consent_required
  • rate_limited
  • invalid_input
  • call_not_found

呼び出しの見本

そのまま試せる呼び出しの例。curl と fetch をタブで切り替える。ID やトークンは自分の値に置き換える。

curl "https://bounty.spikes.4s.link/api/v1/boshu/form-modules" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET /api/v1/boshu/form-modules | Bounty Developer