Select to view content in your preferred language

Error trying to sync bulk published datastore item "Invalid value for serverFolder. Layers have been published from this data store before and the val

283
2
Jump to solution
11-26-2024 08:16 PM
Labels (1)
DrewDowling
Frequent Contributor

I'm trying to sync a bulk published datastore item following the sample code here.

Code I have tried

bulk_publish_job = portal_ds.publish_layers(item = db_dsitem,
                                            srv_config = service_template,
                                            server_id = host_id,
                                            folder = None,
                                            server_folder= None)

bulk_publish_job = portal_ds.publish_layers(item = db_dsitem,
                                            srv_config = service_template,
                                            server_id = host_id)
bulk_publish_job = portal_ds.publish_layers(item = db_dsitem,
                                            srv_config = service_template,
                                            server_id = host_id,
                                            server_folder= 'CurrentFolderName')

I get this error no matter the value I enter for the server folder.

 

Publish layers failed.
Invalid value for serverFolder. Layers have been published from this data store before and the value is read-only. Passing null is valid.  
(Error Code: 400)

 

0 Kudos
1 Solution

Accepted Solutions
MatejVrtich
Esri Contributor

Try server_folder="", at least it worked for me.

View solution in original post

0 Kudos
2 Replies
MatejVrtich
Esri Contributor

Try server_folder="", at least it worked for me.

0 Kudos
DrewDowling
Frequent Contributor

Thanks @MatejVrtich This is what worked for me as well.

0 Kudos