Appearance
named-files
2 endpoints.
GET /api/f/{key}/{filename}
Get Named File
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
key | path | yes | string | |
filename | path | yes | string |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/named-files
Stash Named File
Store a file the SPA already fetched (a report PDF, a POS receipt) so it can be opened on a URL carrying its name instead of a blob: UUID.
Request body
json
{
"properties": {
"filename": {
"type": "string",
"title": "Filename"
},
"base64": {
"type": "string",
"title": "Base64"
}
},
"type": "object",
"required": [
"filename",
"base64"
],
"title": "StashIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}