Get the status of a transaction
(collection_name, transaction_id)
| 325 | |
| 326 | |
| 327 | def get_transaction_status(collection_name, transaction_id): |
| 328 | """Get the status of a transaction""" |
| 329 | url = ( |
| 330 | f"{base_url}/collections/{collection_name}/transactions/{transaction_id}/status" |
| 331 | ) |
| 332 | response = requests.get(url, headers=generate_headers(), verify=False) |
| 333 | if response.status_code == 200: |
| 334 | result = response.json() |
| 335 | return result.get("status", "unknown") |
| 336 | else: |
| 337 | print(f"Failed to get transaction status: {response.status_code}") |
| 338 | return "unknown" |
| 339 | |
| 340 | |
| 341 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected