import requestsurl ="https://api.keywordsai.co/api/request-logs/batch-update/"api_key ="YOUR_KEY"# Replace with your actual Keywords AI API keydata ={"logs":[{"unique_id":"xxxxxx","metadata":{"metadata_key":"updated_value"},"note":"updated note"}# other logs to update]}headers ={"Authorization":f"Bearer {api_key}","Content-Type":"application/json"}response = requests.patch(url, headers=headers, json=data)print(response.json())
You may want to update logs to add more information or correct the existing information. In order to protect the integrity of the logs, you can only update the metadata and notes of the logs.
import requestsurl ="https://api.keywordsai.co/api/request-logs/batch-update/"api_key ="YOUR_KEY"# Replace with your actual Keywords AI API keydata ={"logs":[{"unique_id":"xxxxxx","metadata":{"metadata_key":"updated_value"},"note":"updated note"}# other logs to update]}headers ={"Authorization":f"Bearer {api_key}","Content-Type":"application/json"}response = requests.patch(url, headers=headers, json=data)print(response.json())
import requestsurl ="https://api.keywordsai.co/api/request-logs/batch-update/"api_key ="YOUR_KEY"# Replace with your actual Keywords AI API keydata ={"logs":[{"unique_id":"xxxxxx","metadata":{"metadata_key":"updated_value"},"note":"updated note"}# other logs to update]}headers ={"Authorization":f"Bearer {api_key}","Content-Type":"application/json"}response = requests.patch(url, headers=headers, json=data)print(response.json())