Skip to content
GAMPEONCreate
New project

Upload the file of a version

PUT
/v1/resources/{name}/versions/{version}/file
curl --request PUT \
--url https://api.gampeon.com/v1/resources/example/versions/example/file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data binary

Only the owner, once per version. Size and SHA-256 must match the announced version. Default limits: 256 MB per file, 2 GB per account.

Not available with access tokens.

Rate limit: 30 per hour per account.

name
required
string
/^[a-z0-9][a-z0-9_\-]{1,47}$/

Resource name

version
required
string
/^\d+\.\d+\.\d+(-[0-9A-Za-z.\-]+)?$/

Version

x-file-name
string

Optional file name for downloads (sanitised)

The file

Media typeapplication/octet-stream
string format: binary

Stored

Media typeapplication/json
object
name
required
string
version
required
string
sha256
required
string
sizeBytes
required
integer
url
required
string

Example generated

{
"name": "example",
"version": "example",
"sha256": "example",
"sizeBytes": 1,
"url": "example"
}

Error codes: size_mismatch

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: unauthorized

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: token_not_allowed, forbidden

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: not_found

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: file_exists

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: file_too_large, quota_exceeded

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: unsupported_media_type

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: checksum_mismatch

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Limit: 30 per hour per account. Error codes: rate_limited

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: unavailable_for_legal_reasons

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: storage_disabled

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Report a problem with this pageOther ways to give feedback