Remove STAC¶
Queue removal of a project catalog from the EDITO STAC API. The job runs asynchronously; check the status or the detailed logs using Publication jobs.
Endpoint¶
Authentication: Authorization: Bearer <access_token> and X-EDITO-Refresh-Token: <refresh_token>.
Usage¶
Once you have the catalog ID of a catalog you own (see Get my catalogs), use it directly in the request:
curl -X POST "${EPT_API_URL}/v1/edito/stac/jobs/removal" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-EDITO-Refresh-Token: ${REFRESH_TOKEN}" \
-d '{
"catalog_id": "projects/{project-id}/{catalog-to-remove}"
}'
Python (httpx)¶
import os
import httpx
response = httpx.post(
f"{os.environ['EPT_API_URL']}/v1/edito/stac/jobs/removal",
headers={
"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}",
"X-EDITO-Refresh-Token": os.environ["REFRESH_TOKEN"],
},
json={"catalog_id": f"{os.environ['REMOVE_CATALOG_ID']}"},
timeout=30.0,
)
response.raise_for_status()
print(response.json()["job_id"])
Request¶
The public request accepts only catalog_id — the ID of the catalog to remove, such as projects/{project-id}/catalog-1.
Response¶
Responds 202 Accepted:
Use the returned job_id with GET /v1/edito/stac/jobs/{job_id}.
Good to know¶
- Removal is destructive: the catalog and its contents are removed from the EDITO STAC API.
- A refresh token is required because an access token may expire before the queued job is processed.