Select to view content in your preferred language

Survey123 API changes

5212
10
06-03-2016 02:03 PM
JaromHlebasko
Frequent Contributor

Hello, I have a question regarding Survey123 API changes. We are trying to narrow down the exact cause as to why our export to PDF option that we created via Python is all of a sudden not working. We have basically narrowed it down to being the API. Were there changes to the API from version 1.3.18 to version 1.4.30? We have a previous example that we published with version 1.3.18 and it works flawlessly but the latter version is somehow stopping the creation of our PDF. Could you please provide me any API changes?

Tags (2)
10 Replies
IsmaelChivite
Esri Notable Contributor

Hi,

I imagine that your Python script is pointing to a Survey123 Feature Service, download some data and then creating the report in PDF format. If this is the case, absolutely nothing should have changed. Technically, we have not exposed any API in Survey123 for ArcGIS.  Unless you mean the source code of the field app, which is available, but it  does not seem like you are referring to the source code of the app itself. I am confused with your question. I am not sure what you mean by the Survey123 API.

Ismael

0 Kudos
JaromHlebasko
Frequent Contributor

Sorry for the confusion. In the Survey123 Connect software there is a gear/sprocket looking icon and when you click on it, it references the Survey123 REST API URL. Did that change at all?

Thanks,

Jarom

0 Kudos
IsmaelChivite
Esri Notable Contributor

I see... Nothing changed in there since a long time ago (October or November 2015 if I am not mistaken).  That URL is used by all versions of Connect (including the old ones), so that piece remains pretty static (from a REST API perspective).

0 Kudos
JaromHlebasko
Frequent Contributor

If you could find out for sure, I would appreciate it. I definitely realized that all versions are referencing that URL. I actually installed 1.3.18 Connect again and tried to publish another survey to test out our PDF export and it had no effect and that is why we are trying to see if there were changes to the REST API because it's only thing that makes sense right now. We did not change anything on our end and this started when we published through version 1.4.30. Again, we have an existing survey that was published a couple weeks ago with 1.3.18 and it works. We are confused!

Thanks,

Jarom

0 Kudos
IsmaelChivite
Esri Notable Contributor

The REST API is a false lead I believe. What is your code doing?  We did change things (not in the REST API) in regards with fields used for related tables. In previous versions, we were not using consistently GlobalIDs for relationships and attachments. With 1.4 changes were introduced there.  This affected  mostly workflows with ArcGIS for Desktop against Survey123 Feature Services, but it may have affected your code?  What is your PDF export doing and how (if in any way) are you invoking the REST API?

0 Kudos
JaromHlebasko
Frequent Contributor

OK, things are starting to make a little more sense now. We are invoking data driven pages to produce our PDF through the hosted feature service the Survey publishes. If some of the workflows have changed with ArcGIS for Desktop, in particular ArcMap, then that may be the culprit. Our script is mining 4 mxd's to ultimately produce 1 combined pdf and then that PDF is emailed automatically.

Thanks,

Jarom

0 Kudos
IsmaelChivite
Esri Notable Contributor

Check the feature service and look to see if it contains any related tables. If so, check your script to see how your Python script is using them. The type of fields used for the relationship between this version and prior have changed. I suggest you start by debugging your Python script to see where it fails.

0 Kudos
JaromHlebasko
Frequent Contributor

Thank you very much for your help! Yes it does have a relationship because there are attachments and the python script stops after the first page which only has the signature attachment. The last 3 mxd's contain only attachments but they are not being created. They are failing to create. This at least gives us a starting point to troubleshoot. You have been very kind!

Thanks,

Jarom

0 Kudos
JaromHlebasko
Frequent Contributor

I wanted to let you know that the question I posed was 'solved'.  Avoiding having two Data Driven Page data objects open at the same time seems to be what was required.  Just why there was a problem might be related to your remark about changes to related tables. We reconstructed our python script to solve the issue. Thanks for your help.

0 Kudos