Select to view content in your preferred language

Exporting reports via API

2428
7
Jump to solution
10-19-2020 02:06 PM
TedChapin
Frequent Contributor

I have been automating feature report exporting via the API and I noticed a change this week that caused it to stop working with no change on my end.

The sequence is to submit a job using
https://survey123.arcgis.com/api/featureReport/createReport/submitJob

with several parameters such as queryParameters, templateItemId, outputReportName, surveyItemId, featureLayerUrl, uploadInfo, outputFormat.

Then follow up with 

https://survey123.arcgis.com/api/featureReport/jobs/<job_id>/status

until the job returns esriJobSucceeded

Starting this week, the status query returns esriJobFailed with a message 
"An error occurred when uploading result files to ArcGIS Online. 498: Invalid token."

It seems that the report gets created but it can't upload it to ArcGIS Online. I use the same token for the initial submitJob request and the status requests.

This has been working for a few months with no problem. I wonder if there was an update behind the scenes that changed something.

0 Kudos
1 Solution

Accepted Solutions
ZhifangWang
Esri Regular Contributor

Hi ALL,

The fix to this issue (BUG-000135295) is available on the beta website https://survey123beta.arcgis.com and will be available on the production website in the next mid-December update.

 

You can have a try by using https://survey123beta.arcgis.com/api/featureReport/createReport/submitJob . If you still observe any issues, please let us know.

 

Thanks again for all your feedback.

View solution in original post

7 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Ted,

Is there any chance the token's lifespan is shorter than the time it takes to complete the job?

0 Kudos
FranciscoAndrade1
Regular Contributor

Hello James, 

 

Do you have an update regarding this issue?

0 Kudos
JillianRizzo
Esri Contributor

Hello https://community.esri.com/migrated-users/6164

This is currently a bug with the latest Survey123 update (3.11). Referrers that are not Survey123 are throwing an invalid token error. The Survey123 team is aware of the issue and actively working to resolve it. If you'd like to be attached to the bug, I recommend logging a ticket with Tech Support!

Hope this helps, let me know if you have any questions 

JR

0 Kudos
TedChapin
Frequent Contributor

@JillianRizzo The generateToken request has a "referer" parameter. Is there a value I can provide that will satisfy the submitJob request? If not, do you have a bug # that I can give to tech support so I can get notified when the bug is addressed?

Thanks

0 Kudos
GISJill
New Contributor

Hello, the bug is BUG-000135295. I am not aware of a current workaround at this time. Feel free to escalate the bug in MyEsri to alert the product team of its importance.

JR

0 Kudos
FranciscoAndrade1
Regular Contributor

Hello,  is there an update regarding this issue?

 

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi ALL,

The fix to this issue (BUG-000135295) is available on the beta website https://survey123beta.arcgis.com and will be available on the production website in the next mid-December update.

 

You can have a try by using https://survey123beta.arcgis.com/api/featureReport/createReport/submitJob . If you still observe any issues, please let us know.

 

Thanks again for all your feedback.