![No UI](https://img.shields.io/static/v1?label=UI&message=none&color=inactive) A simplistic plugin that allows external programs to update asset information fields without the overhead of having to use SOAP. [MINITOC] ## Properties To be configured in *{home}/appserver/conf/custom.properties*. ##### restInfofieldSetter.license > type: String, **required: yes**, default: - license key (delivered by brix IT Solutions) ##### restInfofieldSetter.userId > type: userId, required: no, default: API User the user that should be used to execute the update operations. Uses the default *API User* when nothing is configured. ##### restInfofieldSetter.staticToken > type: String, required: no, default: - Only accept updates when this exact token is provided via the `token` parameter. ## Parameters The plugin is available under `{your.celum.server}/infofield/setter` ##### asset > type: assetId, **required: yes**, occurrence: once The ID of the asset you with to update ##### info-{id}[-{locale}] > type: String, required: no, occurrence: multiple The updated values, per information field ID `{id}` (and an optional `{locale}` if needed). Note that the types are inferred automatically, and that providing an empty value will clear the information field. **Examples**: * `{your.celum.server}/infofield/setter?asset=123&info-105=2018-01-01&info-106-en=My description` - sets the date field *105* to the 01.01.2018 and the English description *106* to "My description" * `{your.celum.server}/infofield/setter?asset=456&info-107=&info-108=Pony` - clears the information field *107* and adds the keyword "Pony" to the node-referencing field *108* ##### noderef-{id}[-remove] > type: String, required: no, occurrence: multiple Specifically for Node Referencing fields, allows you to add (or remove) individual nodes without touching the rest. **Examples**: * `{your.celum.server}/infofield/setter?asset=123&noderef-108=1337` - adds the node *1337* to the noderef field *108* * `{your.celum.server}/infofield/setter?asset=123&noderef-108-remove=1337` - removes the node *1337* from the noderef field *108* ##### token > type: String, required: if `restInfofieldSetter.staticToken` is set, default: - The static token configured in `restInfofieldSetter.staticToken`, must be present and match when configured > > > > > > You can also pass the token as an `Authorization` header, e.g. `Authorization: Bearer `. In fact this should be your preferred method, so no one can sniff the token from your GET parameters. ##### publicurl > type: URL or `delete`, required: no, occurrence: once, since: 1.3 Adds a "PublicURL" to this asset, with the provided URL. Or pass `delete` to delete the same PublicURL again. * description (String) - the description of this PublicURL, **required** (think of this as a key) * provider (String) - the provider of this PublicURL, optional, defaults to "REST" (best practice: name of the system that provided this URL) * instance (String) - the instance of this PublicURL, optional, no default (additional characteristic of the URL or its usage) Warning: to be able to retrieve the asset with CORA (REST API) an instance has to be set. **Examples**: * `{your.celum.server}/infofield/setter?asset=123&description=lowres&publicurl=https%3A%2F%2Fcdn.server%2Flowres%2F123.jpg` - adds the URL https://cdn.server/lowres/123.jpg with the description of `lowres` * `{your.celum.server}/infofield/setter?asset=123&description=lowres&publicurl=delete` - removes the previously described URL again. ## Compatibility Matrix | restInfofieldSetter | CELUM (min. version) | |:------------------- |:-------------------------- | | 1.0 - 1.3 | 5.13.3 (tested up to 6.16) | ## Release Notes #### 1.0 > 2018-11-12 - Initial Version #### 1.1 > 2018-11-16 - Added support for noderefs - Added support for token #### 1.2 > 2018-11-19 - Added support fur multiple locales in one request #### 1.3 > 2021-09-16 * Added support for PublicURLs