本文へ移動
Bounty Developer

GET/api/v1/boshu/drafts/{id}

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

要約

1 つの募集の設計・質問の組・版の hash の読み戻し(今扱える募集だけ。応募者の情報は件数だけ)

呼び方と印

ログイン・レート制限

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

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

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

  • idpath必須string(uuid)

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

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

  • idstring(uuid)
  • sourceKeystring | null
  • origin"mcp" | "manual"
  • editableboolean
  • status"draft" | "published" | "closed"
  • approval"not_required" | "pending" | "approved" | "rejected"
  • subjectobject
    • kindenum(5)"platform" "event" "guild" "venture" "person"
    • idstring(uuid) | null
    • namestring
  • eventIdstring(uuid) | null
  • callobject
    • keyVisualUploadId任意string(uuid) | null
    • templatestring | null
    • kind"staff" | "talk" | "pitch" | "other"
    • titlestring
    • descriptionstring | null
    • requirementsstring | null
    • applicantKind"individual" | "guild" | "venture"
    • audience"all" | "student" | "professional"
    • profilePolicy"kind" | "required" | "basic"
    • messagePolicy"legacy" | "required" | "optional" | "off"
    • portfolioRequiredboolean
    • contentIdstring(uuid) | null
    • sessionIdstring(uuid) | null
    • capacityinteger | null
    • talkMinutesinteger | null
    • opensAtstring(date-time)
    • closesAtstring(date-time)
    • modestring
    • paidboolean
    • compensationstring | null
    • ribbonLabelstring | null
    • questionsarray<object>
      • idstring
      • typeenum(9)"short" "long" "single" "multi" "check" "url" "date" "image" "document"
      • labelstring
      • helpstring | null
      • requiredboolean
      • optionsarray<object>
        • idstring
        • labelstring
      • sensitiveboolean
      • maxLength任意integer
      • condition任意object
        • questionIdstring
        • optionIdstring
      • enabled任意boolean
      • section任意string
      • 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"
        • min1
        • max3
    • ticketOffer任意true
  • questionVersioninteger
  • coManagerUserIdsarray<string(uuid)>
  • applicationCountinteger≥0
  • hashstring/^[0-9a-f]{64}$/
  • updatedAtstring(date-time)
  • publication"draft_only"

失敗したとき(エラー)

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

  • 400入力の誤り(error = invalid_input など)
  • 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
  • partner_owner_not_allowed
  • partner_applicant_kind
  • call_not_found

呼び出しの見本

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

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