Our current implementation for archiving files in NetApp ONTAP consists of two steps:
- Copy the physical file via SFTP.
- Set the retention via NetApp SDK (Java bindings).
We want to change our implementation and use the REST API for setting the retention with the same two-step approach:
- Copy the physical file via SFTP.
- Set the retention via NetApp REST API.
In this case setting the retention does not work and we get this error in the response:
{
"error": {
"message": "File is not retained by SnapLock.",
"code": "13762576"
}
}
After some try&error we noticed that for files which already had a retention set via the NetApp SDK (old way) we could use the REST API (new way) to set the new retention. So the error seems to be limited to new files for which there was not retention set via the NetApp SDK.
In both cases we use exactly the same environment (NetApp 9.12).
Does someone have any hints as to why this error occurs? Is this approach not supported with the REST API?