Баримт бичиг / API лавлах

Шагналт даалгавар

Түншид зориулсан шагналтай даалгавар.

GET/v1/workspaces/{workspaceId}/bounties

List bounties of the program, oldest first.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.read

Параметр (6)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
statequerystring`scheduled`, `active`, `ended` or `archived`.
typequerystring`submission` or `performance`.
pageSizequeryinteger (int32)
startingAfterquerystring
endingBeforequerystring

Хариу: 200 BountyDto[]

POST/v1/workspaces/{workspaceId}/bounties

Create a bounty (R6 to R11). Accepts Idempotency-Key. A start date in the past or now notifies eligible partners at the next scan.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (1)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
Хүсэлтийн бие (CreateBounty)
НэрТөрөлЗаавалТайлбар
typestringтийм`submission` or `performance`.
namestring
descriptionstring
startModestring`absolute` (default) or `relative`.
startsAtstring (date-time)
endsAtstring (date-time)
endsAfterDaysinteger (int32)
rewardAmountinteger (int64)
rewardDescriptionstring
groupIdsarray
partnerTagIdsarray
performanceConditionnull | PerfIn
performanceScopestring
maxSubmissionsinteger (int32)
submissionFrequencystring
submissionsOpenDaysinteger (int32)
submissionRequirementsobject

Хариу: 201 BountyDto

GET/v1/workspaces/{workspaceId}/bounties-needs-review

Number of submissions waiting for review in the program (R27).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.read

Параметр (1)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм

Хариу: 200 NeedsReview

GET/v1/workspaces/{workspaceId}/bounties/{bountyId}

One bounty with submission counts.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.read

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм

Хариу: 200 BountyDto

PATCH/v1/workspaces/{workspaceId}/bounties/{bountyId}

Edit a bounty (R14). Before the first submission everything except the type is editable; afterwards only the name, description, end, audience, reward note and loosened requirements.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм
Хүсэлтийн бие (PatchBounty)
НэрТөрөлЗаавалТайлбар
typestring
namestring
descriptionstring
startModestring
startsAtstring (date-time)
endsAtstring (date-time)
endsAfterDaysinteger (int32)
rewardAmountinteger (int64)
rewardDescriptionstring
groupIdsarray
partnerTagIdsarray
performanceConditionnull | PerfIn
performanceScopestring
maxSubmissionsinteger (int32)
submissionFrequencystring
submissionsOpenDaysinteger (int32)
submissionRequirementsobject

Хариу: 200 BountyDto

DELETE/v1/workspaces/{workspaceId}/bounties/{bountyId}

Delete a bounty without submissions (R15, no webhook); with submissions it must be archived.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм

Хариу: 204

POST/v1/workspaces/{workspaceId}/bounties/{bountyId}/archive

Archive: hidden from partners, kept for history (R15, R16).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм

Хариу: 200 BountyDto

GET/v1/workspaces/{workspaceId}/bounties/{bountyId}/submissions

Submissions of one bounty (R27): the review queue, oldest first by default. Drafts are private to the partner and never listed (R20).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.read

Параметр (9)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм
statusquerystring`draft`, `submitted` (default), `approved`, `rejected`; `all` for every status but drafts.
groupIdquerystring
partnerIdquerystring
sortByquerystring`completedAt` (default) or `performanceCount`.
sortOrderquerystring`asc` (default) or `desc`.
pageSizequeryinteger (int32)
startingAfterquerystring

Хариу: 200 SubmissionDto[]

POST/v1/workspaces/{workspaceId}/bounties/{bountyId}/submissions/bulk

Approve or reject up to 100 submissions independently (R31): never all-or-nothing.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм
Хүсэлтийн бие (BulkBody)
НэрТөрөлЗаавалТайлбар
actionstringтийм`approve` or `reject`.
partnerIdsstring[]тийм
groupIdstring
tagIdsarray
tagNamesarray
rejectionReasonstring
rejectionNotestring
reapplicationTimeframestring
flagForFraudboolean
flagForFraudReasonstring

Хариу: 200 BulkResult[]

POST/v1/workspaces/{workspaceId}/bounties/{bountyId}/submissions/{submissionId}/approve

Approve a submitted entry (R28): creates the reward commission in the same transaction.

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (3)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм
submissionIdpathstringтийм
Хүсэлтийн бие (ApproveBody)
НэрТөрөлЗаавалТайлбар
accessstring`editor` (default) or `owner`.

Хариу: 200 SubmissionDto

POST/v1/workspaces/{workspaceId}/bounties/{bountyId}/submissions/{submissionId}/reject

Reject a submitted entry (R29).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (3)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм
submissionIdpathstringтийм
Хүсэлтийн бие (RejectBody)
НэрТөрөлЗаавалТайлбар
partnerIdstringтийм
applicationIdstring
rejectionReasonstring
rejectionNotestring
reapplicationTimeframestring`instant`, `standard` (default, 30 days) or `never`.
flagForFraudboolean
flagForFraudReasonstring

Хариу: 200 SubmissionDto

POST/v1/workspaces/{workspaceId}/bounties/{bountyId}/submissions/{submissionId}/reopen

Reopen a rejected or submitted entry so the partner can edit it (R17, R30).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (3)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм
submissionIdpathstringтийм

Хариу: 200 SubmissionDto

POST/v1/workspaces/{workspaceId}/bounties/{bountyId}/unarchive

Unarchive: the bounty returns to its derived state (R16).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.write

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
bountyIdpathstringтийм

Хариу: 200 BountyDto

GET/v1/workspaces/{workspaceId}/bounty-files/{fileId}

Download a proof file of a submission (authenticated; the API serves the bytes).

Шаардлагатай API түлхүүрийн хамрах хүрээ: bounties.read

Параметр (2)
НэрБайрлалТөрөлЗаавалТайлбар
workspaceIdpathstringтийм
fileIdpathstringтийм

Хариу: 200