本文へ移動
Bounty Developer

POST/api/boshu/owners/{kind}/{id}/calls

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

要約

持ち主の募集を作る(ギルド・学生発ベンチャーは承認待ちで作られ、運営の承認まで参加者に見せない・告知しない)

呼び方と印

ログイン

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

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

  • kindpath必須"event" | "guild" | "venture" | "person"
  • idpath必須string(uuid)

送るもの(本文)application/json

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

  • signupPolicy任意"required" | "optional"
  • ticketOffer任意boolean
  • groupSubmissionPolicy任意"managers" | "confirmed_members"
  • defaultMailPreviewHash任意string
    /^[a-f0-9]{64}$/
  • applicantKind任意"individual" | "guild" | "venture"
  • template任意enum(10) | null
    • "member"
    • "talk"
    • "pitch"
    • "hackathon"
    • "student_guild"
    • "student_venture"
    • "guild_royale"
    • "creative_blitz"
    • "open_meeting"
    • "partner"
  • profilePolicy任意"kind" | "required" | "basic"
  • portfolioRequired任意boolean
  • messagePolicy任意"legacy" | "required" | "optional" | "off"
  • applicationFields任意object | null
  • headline任意object
  • enabled必須boolean
  • required必須boolean
  • label必須string
    長さ 1–120
  • placeholder必須string
    長さ ≤200
  • message任意object
  • enabled必須boolean
  • required必須boolean
  • label必須string
    長さ 1–120
  • placeholder必須string
    長さ ≤200
  • links任意object
  • enabled必須boolean
  • required必須boolean
  • label必須string
    長さ 1–120
  • placeholder必須string
    長さ ≤200
  • portfolio任意object
  • enabled必須boolean
  • required必須boolean
  • label必須string
    長さ 1–120
  • placeholder必須string
    長さ ≤200
  • contentId任意string(uuid) | null
  • keyVisualUploadId任意string(uuid) | null
  • audience任意"all" | "student" | "professional"
    既定 "all"
  • kind必須"staff" | "talk" | "pitch" | "other"
  • title必須string
    長さ 1–60
  • description任意string | null
    長さ ≤2000
  • requirements任意string | null
    長さ ≤600
  • sessionId任意string(uuid) | null
  • capacity必須integer | null
    1–500
  • talkMinutes任意integer | null
    1–120
  • opensAt必須string
  • closesAt必須string
  • mode任意"review" | "first_come"
    既定 "review"
  • paid任意boolean
    既定 false
  • compensation任意string | null
    長さ ≤120
  • ribbonLabel任意string | null
    長さ ≤16
  • status任意"draft" | "published" | "closed"
    既定 "draft"
  • questions任意array<object>
    件数 ≤60
  • id必須string
    /^q_[a-z0-9]{4,24}$/
  • type必須enum(9)
    • "short"
    • "long"
    • "single"
    • "multi"
    • "check"
    • "url"
    • "date"
    • "image"
    • "document"
  • label必須string
    長さ 1–120
  • help任意string | null
    長さ ≤1000
  • required任意boolean
    既定 false
  • enabled任意boolean
  • options任意array<object>
    件数 ≤20 · 既定 []
  • id必須string
    /^o_[a-z0-9]{1,24}$/
  • label必須string
    長さ 1–60
  • sensitive任意boolean
    既定 false
  • maxLength任意integer
    1–2000
  • section任意string
    長さ 1–80
  • organizationField任意enum(11)
    • "name"
    • "nameKana"
    • "organizationType"
    • "baseUniversities"
    • "foundedYearMonth"
    • "memberCount"
    • "studentMemberCount"
    • "genres"
    • "links"
    • "catchphrase"
    • "activitySummary"
  • profileField任意enum(9)
    • "displayName"
    • "title"
    • "orgName"
    • "schoolName"
    • "gradYear"
    • "organizations"
    • "faculty"
    • "standing"
    • "grade"
  • memberSelection任意object
  • kind必須"active_student"
  • min必須1
  • max必須3
  • condition任意object
  • questionId必須string
    /^q_[a-z0-9]{4,24}$/
  • optionId必須string
    /^o_[a-z0-9]{1,24}$/

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

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

  • idstring

失敗したとき(エラー)

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

  • 400入力の誤り(error = invalid_input など)
  • 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
  • 403権限が無い
  • forbidden
  • owner_not_found
  • invalid_input
  • session_not_allowed
  • session_not_found
  • manager_reverify_required

呼び出しの見本

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

curl -X POST "https://bounty.spikes.4s.link/api/boshu/owners/{kind}/{id}/calls" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "staff",
    "title": "string",
    "capacity": 1,
    "opensAt": "string",
    "closesAt": "string"
  }'
POST /api/boshu/owners/{kind}/{id}/calls | Bounty Developer