General
Add a Temporary File
POST {baseUrl}/fws/api/fileMultipart POST, for example:
Content-Type: multipart/form-data; boundary=----XXX
Authorization: Bearer 12345d-c123-1ce0-9893-0123456c83b
----XXX
Content-Disposition: form-data; name="file"; filename=".../odm.fdx"
(data)
----XXX
Content-Disposition: form-data; name="json"
{"requestId": "example123"}
----XXX
This request can be used to add a temporary file to the system. The temporary file can be used in any further calls which reference a file. For example, a file can be uploaded using this call, and then a File asset can be created that references it.
This request is sent as a multipart/form-data POST request with the first part JSON and the second part being the file to stage.
If a file is staged successfully, the response will include the original requestId and the file reference.
Example response:
{
"requestId": "1234567890",
"uuid": "2f4f2f22-6860-4312-aa5f-fb3ea6c595f9",
"path": "stagedfile.xml"
}
Errors:
HTTP Status | Error Code |
|
|---|---|---|
400 | malformed_json | The input JSON request is missing. |
400 | file_not_found | The input file is missing from the request. |
See also Common Errors
Retrieve a Previously Prepared File
GET {baseUrl}/fws/api/file/fileUUIDReplace fileUUID with the value from the previous request.
Retrieve the previously prepared file specified by the fileUUID as a standard binary octet stream.
Should the file not yet be available, or no longer exist in the system, an appropriate HTTP response is returned.
The fileUUID is the UUID previously returned to the caller on a file generation request.
Files are removed from the system 7 days after their generation and the related UUID will no longer be valid. If a file is required after this period, the initial ‘request’ to generate the file can be re-performed (and a new UUID assigned).
The generated file must be saved as a .zip file.
octet-stream of the fileErrors:
HTTP Status | Error Code |
|
|---|---|---|
400 | invalid_uuid | An invalid UUID was specified as the fileUUID. |
404 | unknown_file | The fileUUID specified does not match any known generated files. |
See also Common Errors
Retrieve Checksums for a Previously Prepared File
GET {baseUrl}/fws/api/file/fileUUID/checksumRetrieve checksums for the previously prepared file as specified by the given fileUUID. If the file is not yet available or no longer exists in the system, an appropriate HTTP response is returned.
The fileUUID is the UUID previously returned to the caller on a file generation request.
Currently, only the MD5 hash of the file is returned.
Example response:
{
"md5": "0123456789abcdef0123456789abcdef"
}Errors:
HTTP Status | Error Code |
|
|---|---|---|
400 | invalid_uuid | An invalid UUID was specified as the fileUUID. |
404 | unknown_file | The fileUUID specified does not match any known generated files. |
404 | file_checksum_not_found | A file was found but it had no checksum stored. |
See also Common Errors
Request a File Asset’s files
GET {baseUrl}/fws/api/repository/container/containerAID/containerVersion/asset/assetAID/filesRetrieve the files associated with a File asset for the specified assetAID in containerAID and containerVersion. This request returns a UUID that can be used with the existing Retrieve a previously prepared File request.
Example response:
{
"uuid": "01234567-89ab-cdef-0123-456789abcdef"
}Errors:
HTTP Status | Error Code |
|
|---|---|---|
400 | invalid_container_aid | An invalid AdministeredID was specified as the containerAID. |
400 | invalid_container_version | A non numeric value was specified as the version. |
400 | invalid_asset_aid | An invalid AdministeredID was specified as the assetAID. |
400 | invalid_asset_type | If the supplied assetAID isn’t a FILE asset. |
404 | unknown_container | Unknown containerAID/version pair. |
404 | unknown_asset | Unknown asset within the containerAID/version pair |
See also Common Errors
