import requests def update_3d_image_task_status(row_id, new_status): # Define the URL for the API endpoint url = "https://your-anvil-app-url/_/api/update_3d_image_task_status" # Create a JSON payload payload = {"row_id": row_id, "new_status": new_status} # Make a POST request to the API endpoint with the JSON payload response = requests.post(url, json=payload) # Handle the response if response.status_code == 200: print("Status update was successful") return response.json() else: print("Status update failed") print("Status code:", response.status_code) print("Response:", response.text) return None def get_3d_image_task(row_id): # Define the URL for the API endpoint url = f"https://your-anvil-app-url/_/api/get_3d_image_task/{row_id}" # Make a GET request to the API endpoint response = requests.get(url) # Handle the response if response.status_code == 200: print("Request was successful") return response.json() else: print("Request failed") print("Status code:", response.status_code) print("Response:", response.text) return None # Example usage result = get_3d_image_task("example_row_id") print(result)