Get File
API Name
API Name: File – Get Content
Overview
This API retrieves the content of a file from the end system.
MBSE Core uses this API to:
Download file content for attached files
Retrieve binary file data for synchronization
Support file transfer between systems
Stream file content directly without storing intermediate copies
Connector responsibility:
Receive the
fileLocationUri.Invoke the appropriate mechanism to obtain the file content from
fileLocationUri.Return the content as an
InputStream.Stream the file content.
This API is implemented as a pass-through operation.
API URI
URI Parameters
projectId
True
String
ID of the project.
fileLocationUri
True
String
Content download URL or file path where the file is stored.
Connector Contract
Connector must implement:
Method Behavior
Accept
fileLocationUrias input.Return the content as
InputStreamin the servlet response.
Behavior Rules
projectIdmust be validated before retrieving content.fileLocationUrimust be present.File content should be streamed directly whenever possible.
Avoid loading entire files into memory for large files.
If file cannot be found:
Return HTTP
404 Not Found
If access is denied:
Return HTTP
404 Not Found
If file retrieval fails:
Return HTTP
500 Internal Server Error
Connector must close streams appropriately after transfer completion.
Response Payload
Success Response
Binary stream response.
Example:
Response body:
Response Headers
Content-Type
False
MIME type of file if available.
Content-Length
False
File size in bytes.
Example Use Case
Download File Content
Implementation Guidelines
Do not transform or decode file bytes.
Use streaming APIs where supported.
Handle large files efficiently.
Ensure streams are properly closed after transmission.
Last updated

