Select to view content in your preferred language

Looking for Rest API to create a hosted feature layer/feature class on the ArcGIS Online from a JSON definition

405
2
11-04-2024 09:58 AM
lochd
by
Emerging Contributor

I am looking for a REST API that I can use to create a hosted feature layer (schema only) or feature class from a JSON definition via HTTP POST.

The JSON payload will include the layer name, geometry type, spatial reference, attributes (names and types), and other relevant information.

I checked the ArcGIS REST APIs, but I could not find an appropriate endpoint.

Please provide your feedback.

Thank you.

0 Kudos
2 Replies
ChrisUnderwood
Esri Regular Contributor

Hello @lochd , does this ArcGIS REST API meet your needs ?
https://developers.arcgis.com/rest/users-groups-and-items/create-service/

It does offer "POST request for the createService operation" and "JSON object specifying the properties of the newly created service" ?

0 Kudos
lochd
by
Emerging Contributor

Hi Chris,

I took a look at the API you gave me. It seems not a right one. No way to define a list of attributes (name and data types) in the JSON.

Thanks,

Loc

0 Kudos