16 lines
407 B
Python
16 lines
407 B
Python
import requests
|
|
|
|
STAC_API_URL = "http://localhost:8082"
|
|
COLLECTION_ID = "geosat1"
|
|
|
|
def delete_item(item_id):
|
|
url = f"{STAC_API_URL}/collections/{COLLECTION_ID}/items/{item_id}"
|
|
r = requests.delete(url)
|
|
if r.status_code in [200, 204]:
|
|
print(f"✅ 已成功删除: {item_id}")
|
|
else:
|
|
print(f"❌ 删除失败: {item_id} | {r.status_code} - {r.text}")
|
|
|
|
|
|
delete_item("TCI_right")
|