Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

Publish FGDB with editing turned off #278

Closed SergStol closed 8 years ago

SergStol commented 8 years ago

ArcRest or ArcRestHelper

ArcRest

Version or date of download

3.5.3

Bug or Enhancement

Repo Steps or Enhancement details

As part of my workflow I want to keep Editing disabled on my Feature Layer item in My Contents. When publishing my FGDB item with this code:

publishParameters = arcrest.manageorg.PublishFGDBParameter(name, description, layerInfo = {"capabilities":"Query"}, targetSR = { "wkid" : 27700 })

It gives me:

Error processing publishFeatureService init() got multiple values for keywor d argument 'layerInfo'

Works fine if i remove layerInfo parameter, but then Editing is enabled by default again, even if I turn it off within My Contents manually prior to running the script.

SergStol commented 8 years ago

Worked it out, The order of parameters were wrong i think, now this works:

publishParameters = arcrest.manageorg.PublishFGDBParameter(name, layerInfo = {"capabilities":"Query, Extract"}, description = description, targetSR = { "wkid" : 27700 })