Generates a secure file reference for a file, as identified by its fileID. Multiple files IDs can be generated in a single call.
A link containing a secure reference can be returned to a site user, the service at the other end of the link can then call unpackSecureFileReferences to decrypt the ID, get the content from the filestore and return it to the user.
Request Parameters
Name | Type | Comments |
---|---|---|
userName | String, required | The name of the user the secure file reference is being generated for. Needed to decrypt the reference |
fileIDs | Array<UUID>, required | The file IDs to generate secure references for |
validityPeriodMins | Integer, optional | The number of minutes the secure reference will be valid for. The decryption method will not decrypt an expired reference. Uses the default set in the worker configuration if not supplied |
formSessionId | String<UUID>, optional | Used in combination with |
Example Request
{
"id": "testreq1",
"method": "generateSecureFileReferences",
"params": {
"userName": "joebloggs",
"fileIDs": ["20296502-C509-4178-8EDE-841048AAF984"],
"validityPeriodMins": 15
},
"jsonrpc": "2.0"
}
Example Response
{
"result": {
"result": {
"20296502-C509-4178-8EDE-841048AAF984": {
"success": true,
"secureReference": "SFR-y4JA6wHgK8hea-zOr7BgCZH9TF3KDy1KA9ZVYehWU65DOPTnPO3gLfddL0KHUsC8hFohe9jOt1C-zktKd7orMNjgh00132hEDwrwNP_srd4AfJEy1QeXbA"
}
}
},
"id": "testreq1",
"jsonrpc": "2.0"
}