Show actual apiCompose submission
In trying to troubleshoot errors, like 504 or failures for entities to show up correctly in FarmOS, or simply to extract these very useful examples from SurveyStack to use for validating JSON Schemas in the Schema Publication Pipeline, it's important to always be able to see the final, real submission to FarmOS.
Right now, we only see failures in the final response screen (failures show up in red), and in that case only the entities that fail are shown. Successes do not show the final apiCompose at all. In addition, if you are reviewing an existing submission, it's similarly impossible to see the final apiCompose.
-
👍 Show in Results page, in theRawsection, only if the user has admin rights to that submission. Allows viewing after submission. Not super accessible to the general user, but nicely searchable if you're looking for a specific thing. -
❌ Show (via a link) during the final screen both success or failure. Allows viewing upon submission, but only visible during submission which is limited. Better to show in Review page which would be visible also from the Results page via Resubmit button. -
👍 Show in the Review page when looking at a survey, maybe as a linkapiCompose resultsnext to theSubmittedflag (see image below for reference, doesn't contain the additionalapiCompose resultslink but you get the idea). Allows viewing both upon submission and after submission via Resubmit.
Last thing to note is that I am saving items to apiCompose but setting type: none. This causes the code to run and the apiCompose to be saved, but not to send to FarmOS. My goal with this is to generate 'farm standard compliant JSON' even if I'm not using FarmOS. Applications include things like Dan's work with the Olive Council, where they are not using FarmOS but we do want to store the information in a schematized way. Right now, when type: none the apiCompose is actually still stored with the submission (ie I can see it in the Results page). So you may want to review the current overall strategy for when and how apiCompose is visible, and move towards a more standard version where it is visible to admin's only, but all the time (no matter what type is set to). Long term, if we add more integrations, this is likely to be what people will expect.
In conclusion, probably:
- Show in the Review page when looking at a survey, maybe as a link
apiCompose resultsnext to theSubmittedflag (see image below for reference, doesn't contain the additionalapiCompose resultslink but you get the idea). Allows viewing both upon submission and after submission via Resubmit. - Ensure apiCompose is only visible to admins in the Results page, as it can contain de-identifying information.
Updated July 2
Identified the security issue is no longer! So here's the remaining issues (hopefully this is helpful based on our discussion today).

