Setting 'Return ID's Only = True' in the query panel at the REST endpoint when querying a feature service published from a registered database against an unregistered view (regardless of the RDBMS) returns an error.
Duplicate of BUG-000110683: This is expected behavior. The Object IDs and the Return IDs Only parameter entries are for the ObjectID data type. If the view is not registered with the geodatabase, even though there is a field called objectid, it is still just like any other field – its type is long integer. In order for this field to be recognized as the ObjectID type, the view must be registered with the geodatabase. Once that is done, the properties of the view would now show the type of the ‘objectid’ field as Object ID and the query would then work.
解决办法
Publish a view which is registered with a geodatabase and successfully run when querying the feature service with 'Return ID's Only: True' at the REST endpoint.