3
0
corteza/api/messaging/spec/attachment.json

77 lines
1.5 KiB
JSON

{
"Title": "Attachments",
"Interface": "Attachment",
"Struct": null,
"Parameters": {
"get": [
{
"name": "sign",
"required": true,
"title": "Signature",
"type": "string"
},
{
"name": "userID",
"required": true,
"title": "User ID",
"type": "uint64"
}
],
"path": [
{
"name": "attachmentID",
"required": true,
"title": "Attachment ID",
"type": "uint64"
}
]
},
"Protocol": "",
"Authentication": [
"Client ID",
"Session ID"
],
"Path": "/attachment/{attachmentID}",
"APIs": [
{
"Name": "original",
"Method": "GET",
"Title": "Serves attached file",
"Path": "/original/{name}",
"Parameters": {
"get": [
{
"name": "download",
"required": false,
"title": "Force file download",
"type": "bool"
}
],
"path": [
{
"name": "name",
"required": true,
"title": "File name",
"type": "string"
}
]
}
},
{
"Name": "preview",
"Method": "GET",
"Title": "Serves preview of an attached file",
"Path": "/preview.{ext}",
"Parameters": {
"path": [
{
"name": "ext",
"required": true,
"title": "Preview extension/format",
"type": "string"
}
]
}
}
]
}