Cancel a large rulebook upload
const url = 'https://api.thebgdb.org/v1/rulebook-uploads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {'x-upload-token': '<x-upload-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.thebgdb.org/v1/rulebook-uploads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'x-upload-token: <x-upload-token>'Discards the upload and the parts already sent. The token stops working.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The upload’s id, from POST /games/{id}/rulebooks/uploads.
Responses
Section titled “Responses”The upload is discarded.
object
Example
{ "ok": true}The x-upload-token header is missing, or the token has expired.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The member has not confirmed their email address.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}No upload has this id and token: it was completed, cancelled or discarded, or the token is another upload’s.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}Over a request limit. rate_limited: without a token, 60 a minute and 2,000 a UTC day per address (more with a token; see Limits above). weekly_limit: the week’s requests or game details are used up (params.max is the cap). The retry-after header says how many seconds to wait: 60 for a minute’s limit, until midnight UTC for a day’s, until Monday 00:00 UTC for a week’s.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}