Get the status of a transaction
(collection_name, transaction_id)
| 264 | |
| 265 | |
| 266 | def get_transaction_status(collection_name, transaction_id): |
| 267 | """Get the status of a transaction""" |
| 268 | url = ( |
| 269 | f"{base_url}/collections/{collection_name}/transactions/{transaction_id}/status" |
| 270 | ) |
| 271 | response = requests.get(url, headers=generate_headers(), verify=False) |
| 272 | if response.status_code == 200: |
| 273 | result = response.json() |
| 274 | return result.get("status", "unknown") |
| 275 | else: |
| 276 | print(f"Failed to get transaction status: {response.status_code}") |
| 277 | return "unknown" |
| 278 | |
| 279 | |
| 280 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected