File Management UI
From the File Management page of the SBS portal, you can perform the following actions:
- View all files stored in SBS for the currently selected account, application, and tenant.
- Filter files by their unique SBS file ID. Since each file ID is unique in SBS, using this filter returns one result only.
- Filter files by an external reference identifier. For example, all files pertaining to an e-Factura invoice, including attachments, have the same external reference.
Access
You can access the File Management page of the portal as follows:
- Sign in to the SBS Portal. During the sign-in process, you will be prompted to select the account, app, and tenant where you are entitled to sign in.
- Click file-management-api in the left hand-side menu.
To interact with the File Management service, you can use either the Web UI or a GraphQL interface. You can switch at any time between the two interfaces by clicking the switch displayed at the top of the page:
View files
After you access the File Management UI, the files stored in SBS for the selected account, application, and tenant are displayed in a grid.
To view details about a particular file, click the file’s ID (first column) in the grid. This opens a dialog box with file details, for example:
The table below shows the file fields that are exposed through the Web UI. To return a file’s full list of fields, query a file through GraphQL.
Field | Description |
---|---|
ID | The unique identifier of the file in SBS. |
Name | The file name. |
Status | The current status of the file. Valid values: UPLOADING - File content is in the process of being uploaded; DOWNLOADING - File content is in the process of being downloaded from the provided URI; DONE - The file is ready; ERROR - An error has occurred during upload or transfer. |
Content type | The content (MIME) type of the file. |
Content length | The size of the file in bytes. |
Created at | The date and time when the file was created in SBS. |
Updated at | The date and time when the file was last updated in SBS. |
External reference | A file may optionally have an external reference. For example, if an invoice was created through the e-Factura Service, all the files related to that invoice (such as XML, PDF, JSON, and attachments) will contain the same external reference which includes the invoice number. |
Public | This flag indicates whether the file is accessible through a public URL or not. |
Click the paperclip icon to download the file to the local disk. |
Query files through GraphQL
To query files through GraphQL
- Switch to the GraphQL interface.
- Run one of the following queries, as required:
file
,files
,filesWithExternalReference
.
For example, the file
query below retrieves full details about a single file by ID:
query($filter:FilesFilter, $downloadUrlTimeout:Int, $uploadUrlTimeout:Int) {
files(filter:$filter){
items {
id
name
active
comment
author { id name email profile }
contentType
contentLength
status
error { code message }
createdAt
updatedAt
externalReference
uploaded
public
downloadUrl(expiresIn: $downloadUrlTimeout)
uploadUrl(expiresIn: $uploadUrlTimeout)
attributes { name value }
}
}
}
{
"filter": {
"id": "YOUR_FILE_ID"
},
"downloadUrlTimeout": 60,
"uploadUrlTimeout": 60
}
Create, modify, delete files
Creating, modifying, and deleting files is available only from the GraphQL interface. For details, see the File Management Service API Reference.