Skip to content

Download an exact attachment through a currently readable content resource.

POST
/api/workspace/attachments/{fileId}/resource-download
curl --request POST \
--url https://example.com/api/workspace/attachments/example/resource-download \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }'
fileId
required
string
access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

Stable identity of one Moltaro resource instance.

object
ModuleKey
string
nullable
ResourceKind
string
nullable
ContextResourceId
string
nullable
ResourceObjectId
string
nullable
Examplegenerated
{
"ModuleKey": "example",
"ResourceKind": "example",
"ContextResourceId": "example",
"ResourceObjectId": "example"
}

File bytes using the verified MIME type, or JSON direct-download authorization identified by X-Moltaro-Download-Authorization: 1. Do not forward the workspace token to storage.

string format: binary
X-Moltaro-Download-Authorization
string
Allowed values: 1

Present with value 1 only for a JSON download authorization. Its absence identifies the file byte response.

Partial file bytes for an accepted Range request.

Media type*/*
string format: binary

Not Found

Media typeapplication/json
object
Data
required
Any of:
object
Descriptor
object
Id
required
string
FileName
required
string
Description
string
nullable
MimeType
required
string
StorageType
required
integer format: int32
Allowed values: 0 1 2 3 4 5
AvailabilityState
required
integer format: int32
Allowed values: 0 1 2 3 4
DetectedMimeType
string
nullable
ImageWidth
integer format: int32
nullable
ImageHeight
integer format: int32
nullable
ContentGeneration
required
integer format: int64
InspectedChecksumSha256
string
nullable
InspectedContentGeneration
integer format: int64
nullable
SizeBytes
required
integer format: int64
ChecksumSha256
required
string
CreatedAt
required
string format: date-time
ModifiedAt
string format: date-time
nullable
CreatedByUserId
string
nullable
CreatedByUserName
string
nullable
ModifiedByUserId
string
nullable
ModifiedByUserName
string
nullable
Content
string format: binary
nullable
RedirectUrl
string format: uri
nullable
RedirectExpiresAtUtc
string format: date-time
nullable
Errors
required
Array<object>
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
required
Array<object>
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
required
boolean
Example
{
"Data": null,
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}