If you insert an print to show the value of Test_id before the get, is it showing the expected org ID ? I ask, because this code... Test_id = 0 print(Test_id) for org in orgs: print(f"ID: {org['id']:<6} Name: {org['name']}") if "Test" in org ["name"]: Test_id = org["id"] ...will leave Test_id = 0 if the condition is never true, giving the 404 error.
... View more