Skip to content

Read one version's source

GET
/v1/artifacts/{id}/versions/{versionNo}/source
curl --request GET \
--url https://shareout.site/v1/artifacts/example/versions/1/source \
--header 'Authorization: Bearer <token>'

The entrypoint text of one version, for a diff or a preview. content is capped at 512 KB (truncated: true past that). Viewer or above.

id
required
string

Artifact ID (e.g. art_abc123).

versionNo
required
integer

Version source

Media typeapplication/json
object
version_no
integer
entrypoint
string
mime
string
size_bytes
integer
content
string
truncated
boolean
Examplegenerated
{
"version_no": 1,
"entrypoint": "example",
"mime": "example",
"size_bytes": 1,
"content": "example",
"truncated": true
}

Access denied

Media typeapplication/json
object
success
required
boolean
error
required

Human-readable message.

string
code
required

Machine-readable error code.

string
request_id

Correlation id (also the X-Request-Id header). Quote it in support tickets.

string
reason

Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.

string
hint

What to do next, in plain words.

string
suggestion
string
param

The request field at fault.

string
docs

Doc page for this error.

string
redirect_url
string
support

Present on 5xx — how to reach a human.

object
how
string
include
Array<string>
Example
{
"success": false,
"support": {
"how": "POST /v1/support/tickets",
"include": [
"request_id"
]
}
}

VERSION_NOT_FOUND, or ASSET_NOT_FOUND when its files are gone

NOT_TEXT — the entrypoint is binary