Is possible to publish a survey using a command line or python script to Portal for ArcGIS/AGOL ?

1961
9
Jump to solution
02-13-2018 01:24 PM
Cristian_Galindo
Occasional Contributor III

I have the folder for a survey created with Survey 123 Connect, I am able to publish it using Survey 123 Connect, but I was wondering if it is possible to publish it using a command line utility, a powershell script or a python script.

Any hints, ideas?

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Cristian,

We don't formally support command-line publishing of forms at this time; however, the process of publishing the form is discoverable via the AppStudio Survey123 Connect (Template).  Aside from the creation of the form item, a relationship between the form and the submitting feature service also exists.  You may also want to look at Updating the media folder of a Survey123 Form item, which is one of the most common use cases for automating the publishing process.

View solution in original post

0 Kudos
9 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Cristian,

We don't formally support command-line publishing of forms at this time; however, the process of publishing the form is discoverable via the AppStudio Survey123 Connect (Template).  Aside from the creation of the form item, a relationship between the form and the submitting feature service also exists.  You may also want to look at Updating the media folder of a Survey123 Form item, which is one of the most common use cases for automating the publishing process.

0 Kudos
Cristian_Galindo
Occasional Contributor III

looking at that code, it is bit tricky trying to implement it as a powershell script.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Cristian,

The trickier parts relate to the creation of the feature service based on the form XML.  If you already have a feature service, it is more a matter of zipping up the form files and posting into ArcGIS Online.  Invoke-RestMethod looks to be the best method in powershell, as it automates the response handling.

0 Kudos
Cristian_Galindo
Occasional Contributor III

first, thanks for your answer.

Just to be clear, should I install the AppStudio, then download/open the "Survey123 connect template"in order to check the process?

0 Kudos
Cristian_Galindo
Occasional Contributor III

How do I get AppStudio??? I just get an ArcGIS Developer Premium Annual Subscription, I tough it will be included there....I can't find it

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Cristian,

Yes, AppStudio Desktop should be available with the Developer Subscription.  clesueur-esristaff‌ - Can you help identify where to get AppStudio?

0 Kudos
Cristian_Galindo
Occasional Contributor III

Thanks!!, I was digging in the ESRI network and find it. rigth now i am installing it

0 Kudos
MaazaMekuria
Occasional Contributor

Is there any update after two years on the ability to publish surveys on command line or batch?