Rest API /describe returns readOnly fields as editable
I would like to use the REST API to list all the editable string type fields, with this endpoint:
/rest/v1/leads/describe.json
The problem is, it returns non-editable fields with the readOnly attribute set to false. For example:
{"id":104,"displayName":"Anonymous IP","dataType":"string","length":255,"rest":{"name":"anonymousIP","readOnly":false} ...
I have an integration where my users can select a field to store short string data. But at the moment they are able to select such non-editable fields, and their data gets lost.
Is there any way to filter the real read-only fields?