REST API: about the $FILES field

Please complete the details below then remove this line:


Domino/Notes Version: 14.5FP1
Add-on Product (if appropriate, e.g. Verse / Traveler / Nomad / Domino REST API): Domino REST API
Its Version: 1.1.6
Operating System: Linux
Client (Notes, Nomad Web, Nomad Mobile, Android/iOS, browser version): HCL Domino REST API Administrator + Postman


Problem/Query:

Hi,

I noticed that in the Field settings “Field name” in the Schema management interface of REST API has no effect with the $FILES field.

I.e. is not possible to give an alias different from “$FILES” for that item back to the API clients, is it correct?

Always the $FILES field is of type String when it has a single entry while it is of type array if it has more than one entries.
Isn’t it possible to have always an array (with one or more elements)?

thanks
tommaso

In Domino, the “$FILES” field is treated as a reserved field. The DRAPI checks for “$FILES” field to handle the attachments, so that’s why it may not be respecting the alias name.

In Domino, the multiple value fields are stored as an array list. But if there is only one value, then Domino treats it as a single string value instead of array. This is working as designed and thus DRAPI is also using this behavior as default.

You may try an approach like, create a Formula Field in the Schema, use @Explode($FILES,””) in the formula, and check if this formula field is helpful to you. @Explode formula should create an array list.