Select to view content in your preferred language

listing all layers in a feature service

1233
2
Jump to solution
01-07-2022 11:07 AM
MeganAlnico
Emerging Contributor

Hi,

I'm trying to make a rest call to list "all the layers in a feature service" so I can select the right one to upload data to. 

think this is the right API to call:
https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm

But when I assemble a URL to make a query I get HTML back that says: 

403 ERROR - The request could not be satisfied.

After creating a feature called newTest3 I get this URL back: 

0 Kudos
1 Solution

Accepted Solutions
ChrisSeabrooke1
Occasional Contributor

Use ?f=pjson, to get json-formatted response. With the URL above, it would be:

https://services3.arcgis.com/INSTANCE_I_THINK/arcgis/rest/services/newTest3/FeatureServer?f=pjson

Use f=html to get result in html

View solution in original post

2 Replies
ChrisSeabrooke1
Occasional Contributor

Use ?f=pjson, to get json-formatted response. With the URL above, it would be:

https://services3.arcgis.com/INSTANCE_I_THINK/arcgis/rest/services/newTest3/FeatureServer?f=pjson

Use f=html to get result in html

MeganAlnico
Emerging Contributor

Thanks all the examples ended with /query. That was my issue. 

0 Kudos