Select to view content in your preferred language

all fields but a few

1466
1
12-23-2013 12:59 AM
roeyArditi
New Contributor
is it possible to get all fields but a few?
something like using OutFields="*" and to filter out a few
0 Kudos
1 Reply
WilliamCraft
MVP Alum
Nope.  You have to specify all of the fields you want returned OR you get them all.  To make life easier, though, you can copy and paste the field names you want returned in your query.  To get the list of available fields to copy, you can view the properties of the layer from your service in the REST API and just delete the unwanted fields and text.  From your service, click the Layer Name / ID you wish to "filter" and then scroll down toward the bottom to get the Fields section.  Copy all of it to something like Notepad, then delete the extra stuff and bullets you don't want.  You can then insert the trimmed-down, comma-separated list of fields into your REST query.
0 Kudos