Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
gunnard_fredrickson
Contributor II
Contributor II

API and PUT

I am creating a new job. This job is pulling records off of an API and putting them into a database table. That is working fine. Now I have to read from the table and get the Orders that I just put into the table. That is fine. Then I need to do an API POST for each order. The API Post needs to iterate thru the orders one at a time and change the Export flag on each order to true. This way we won't be pulling the same records over and over again. But when I try to put the order number into variable for the API Post it says that I can't do that and when I try to put the value in the API post it errors out with a 'HTTP 401 unauthorized' error.

Labels (4)
2 Replies
Anonymous
Not applicable

Hello @Gunnard Fredrickson​ ,

Which component are you trying to invoke the POST api? could you please provide the while job execution error log for more investigation?

 

Best regards

Aiming

 

LLopeza1682662066
Contributor II
Contributor II

For the first issue, without seeing your code, it's difficult to pinpoint the exact problem. However, it's possible that you are trying to assign the order number to a variable that is not of the correct data type or is not defined correctly. You might also be trying to assign the value of the order number to a variable that has not been declared or is out of scope.

For the second issue, the "HTTP 401 unauthorized" error typically means that the API endpoint you are trying to access requires authentication credentials, and you are not providing them or are providing incorrect ones. You may need to check the API documentation to see what type of authentication is required and how to properly include it in your API POST request.

If you are still having trouble with these issues, you may want to consider seeking help from a developer or consultant who has experience with the specific API and database technologies you are working with. UMR Provider Login Portal