Rest API /describe returns readOnly fields as editable

Anonymous
Not applicable

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?

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Rest API /describe returns readOnly fields as editable

One of several frustrations with the Describe API. At least they sort-of fixed a problem with max field lengths being wrong. (But not really, if you are syncing with SFDC.)

I actually think that readOnly means something else here, so it isn't even trying to be correct for your purposes.