本文へ移動
Bounty Developer

POST/api/boshu/shelf/template

「BOSHU の管理」の分類の、新しく作る、または操作を実行するために内容を送る API。ログインした本人として呼ぶ。

要約

テンプレートの設問のページ(一覧のモジュールを作れる人なら棚に用意してから、棚にあるものは参照・無いものはその募集だけの写し)。募集は変えない

呼び方と印

ログイン

送るもの(本文)application/json

送る本文の欄。「必須」の印がある欄は省けない。

  • ownerKind必須enum(5)
    • "platform"
    • "event"
    • "guild"
    • "venture"
    • "person"
  • ownerId任意string(uuid) | null
  • template必須enum(10)
    • "member"
    • "talk"
    • "pitch"
    • "hackathon"
    • "student_guild"
    • "student_venture"
    • "guild_royale"
    • "creative_blitz"
    • "open_meeting"
    • "partner"
  • title任意string
    長さ ≤200

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

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

  • pageobject
    • idstring
    • destinationstring
    • placementstring
    • titlestring
    • modulesarray<object | object>
      • |1object
        • kind"shared"
        • idstring
        • moduleIdstring
        • pinned任意object
          • revisioninteger
          • bodyobject
            • titlestring
            • helpstring | null
            • questionsarray<object>
      • |2object
        • kind"inline" | "legacy"
        • idstring
        • bodyobject
          • titlestring
          • helpstring | null
          • questionsarray<object>
            • idstring
            • typestring
            • labelstring
  • shelfarray<object>
    • idstring
    • keystring
    • eventIdstring | null
    • destinationsarray<string>
    • revisioninteger
    • bodyobject
      • titlestring
      • helpstring | null
      • questionsarray<object>
        • idstring
        • typestring
        • labelstring
    • archivedAt任意string | null

失敗したとき(エラー)

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

  • 400HTTP 400(x-bounty-error-codes を参照)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403HTTP 403(x-bounty-error-codes を参照)
  • invalid_input
  • forbidden
  • human_action_required

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/boshu/shelf/template" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "ownerKind": "platform",
    "template": "member"
  }'
POST /api/boshu/shelf/template | Bounty Developer