Job Submission via API - help please!!
Posted: Mon Dec 11, 2023 10:11 pm
Hello all! I am developing a custom front-end job submission UI for our project managers to use. I have a simple file upload page which sends a user-selected file to Switch for processing.
For the time being, all my parameters and variables (username, password, content size, etc.) are being defined within my code, as I'm just trying to at least set up a working link between my localhost and the Switch app.
I am using vanilla JavaScript, with VSCode as my IDE, and for my own reference, I am following the Switch Web Services REST API Documentation written by Enfocus: https://www.enfocus.com/manuals/Develop ... index.html
I have no trouble logging in and authenticating to the Switch server, whether I'm using the Documentation sample Login points, or my own JS code:
Next, I need to select a file to submit for a job. This has absolutely no issues if using the API Documentation. I'm even getting a job ID response from the server. However, when submitting the same file using my UI, the server returns a status 500 - Internal Server Error:
How is this possible? If submission via the Documentation is successful, that means all my server settings and ports are correct, and open. I am making sure to include all the necessary data that is also included when submitting via the Documentation page. This can be seen in my code, as well. I have tried troubleshooting for weeks with no success. Maybe someone can help understand where to look next?
I'm attaching a zip of my code, in case its helpful.
Thank you so much!
Dima
For the time being, all my parameters and variables (username, password, content size, etc.) are being defined within my code, as I'm just trying to at least set up a working link between my localhost and the Switch app.
I am using vanilla JavaScript, with VSCode as my IDE, and for my own reference, I am following the Switch Web Services REST API Documentation written by Enfocus: https://www.enfocus.com/manuals/Develop ... index.html
I have no trouble logging in and authenticating to the Switch server, whether I'm using the Documentation sample Login points, or my own JS code:
Next, I need to select a file to submit for a job. This has absolutely no issues if using the API Documentation. I'm even getting a job ID response from the server. However, when submitting the same file using my UI, the server returns a status 500 - Internal Server Error:
How is this possible? If submission via the Documentation is successful, that means all my server settings and ports are correct, and open. I am making sure to include all the necessary data that is also included when submitting via the Documentation page. This can be seen in my code, as well. I have tried troubleshooting for weeks with no success. Maybe someone can help understand where to look next?
I'm attaching a zip of my code, in case its helpful.
Thank you so much!
Dima