Rest API /describe returns readOnly fields as editable | Community
Skip to main content
August 22, 2016
Question

Rest API /describe returns readOnly fields as editable

  • August 22, 2016
  • 1 reply
  • 1389 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
August 22, 2016

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.