API: ReadOnly Fields on MetadataView Causes Error when updating
Hi All,
we have just noticed that when a field is set as Readonly on MetadataView configuration, the API is not allowed to update it and fails with the error below:
InvalidParameter: One or more parameters are invalid
Despite the API checkbox being selected on Metadata View.
It would be great to have different setting for Edit/View exclusive for the API. What do you think?
-
Official comment
Yes, this is by design, and it was changed several times based on feedback from other customers. This is how it behaves now:
- If the metadata update request is made on behalf of a user, then the same rules apply as for changing metadata in the UI, i.e., if a field is read-only or not in the metadata view of the archive, then the field cannot be set.
- If the metadata update request is made as administrator, then no restrictions apply, and all metadata fields can be changed.
A request is made on behalf of a user if:
- The client is using interactive OAuth (e.g., a typical web application or desktop/mobile application with user login)
- The client is using legacy user impersonation with the FWAPIToken header.
A request is made as administrator if:
- The client is using non-interactive OAuth (e.g., a typical back-end integration, such as a script or automatic task)
- The client is using the legacy API key with the FWAPIToken header.
If a request is made on behalf of a user, then ALL of the following requirements must be met for setting a metadata field:
- The field MUST be in the metadata view of the archive to which the asset belongs
- The field MUST be be editable (i.e., not read-only)
- If a field is required, then its value MUST NOT be empty (but you can omit the field in the request to leave its value unchanged).
- The requesting user MUST have "Edit Text" permission in the archive to which the asset belongs.
As an exception, if a field is a built-in field in the metadata view, then the only requirement is that the user MUST have "Edit Text" permission in the archive to which the asset belongs. These fields can be changed in the metadata view settings, but by default, they are:
- 5 - Title
- 120 - Description
- 25 - Keywords
- 230 - Image Notes
- 320 - Rating
- 10 - Status
Comment actions
Please sign in to leave a comment.
Comments
2 comments