Information model and API
The Data Upload(DU) API is for storing files in azure blob storage.
#
Data typesData types are used for separating and categorizing of files. Data type model has id, name and allowedExtensions properties.
Id and name are unique across all API.
#
AllowedExtensionsAllowedExtensions are for having restriction on files extensions. E.g. data type can allow only ([.xlsx, .xls]) (excel) files. It means that when the user uploads files with other extensions the system will throw an error.
#
FilesFile statuses are business statuses of files and can be one of the following list: [none, pending, processing, validationError, processingError, processed, new, opened, authorizationError]
- none - file is just uploaded
- pending - file is waiting to be processed
- file processing starts
- processingError - while processing something happens, and it throws an error
- processed - file was processed successfully
- new - if it is uploaded but not downloaded yet (only recommendations)
- opened - if the file was downloaded (only recommendations)
- authorizationError - this status is used when file processing throws an authorization error
POST โ/Files endpoint is used for posting files to Azure blob storage.
While posting, it's required to specify the Data type and File. The Object owner filed is not required, if it is not specified the system will pick up the logined user and set it as an objectOwner.
After posting the system generates a definition of file
For updateing file status can be used this endpoint
PUT /Files/status
#
MetadataMetadata is used for determining user access for files.
objectType
of metadata must be from the given list
[equipment, mainSystem, plant, organization]
It can be specified only after posting of file with this endpoint:
PUT /Files/{id}/Metadata