.. AUTO-GENERATED FILE. DO NOT EDIT. DELETE /playstore-download-histories-delete-one =============================================== Summary ------- - **Source repository:** ``jef-systems/jef-playstore-backend`` - **Source SHA:** ``64ad77ce9b0661a0074a608cea670ffb33b24903`` - **Source run id:** ``28958095610`` - **Lambda function:** ``jef-playstore-delete-005`` - **Lambda ARN:** ``arn:aws:lambda:ap-southeast-1:246715082475:function:jef-playstore-delete-005`` - **HTTP method:** ``DELETE`` - **Operation:** ``delete-one`` - **Invoke mode:** ``asynchronous`` - **Public DELETE endpoint:** ``https://api.jefoffice.com/playstore-download-histories-delete-one`` - **Public status endpoint:** ``https://api.jefoffice.com/playstore-download-histories-delete-one/status`` - **API path:** ``/playstore-download-histories-delete-one`` - **Status path:** ``/playstore-download-histories-delete-one/status`` - **Cloudflare public base URL:** ``https://api.jefoffice.com`` - **DynamoDB table:** ``jef-playstore-download-histories`` - **Primary key:** ``download\_history\_id`` - **Cascade mode:** ``durable-job`` - **No-scan cascade:** ``true`` - **Throttle safe:** ``true`` Required Input -------------- The DELETE request must include the primary key. The Lambda accepts the real primary key field name, ``primary_key_value``, or ``id``. Accepted primary key aliases: - ``download\_history\_id`` - ``primary_key_value`` - ``id`` Optional fields: - ``cascade_delete``: defaults to ``true``. When true, the Lambda creates a durable async delete job. - ``delete_job_id``: used only when polling the status endpoint. DELETE Request Body Example --------------------------- .. code-block:: json { "download_history_id": "00000000-0000-4000-8000-000000000000", "cascade_delete": true } Alternative Body Example ------------------------ .. code-block:: json { "primary_key_value": "00000000-0000-4000-8000-000000000000", "cascade_delete": true } Query Example ------------- .. code-block:: text DELETE /playstore-download-histories-delete-one?download_history_id=00000000-0000-4000-8000-000000000000&cascade_delete=true CMD curl -------- .. code-block:: bat curl -X DELETE "https://api.jefoffice.com/playstore-download-histories-delete-one" -H "Content-Type: application/json" --data-raw '{"download_history_id": "00000000-0000-4000-8000-000000000000", "cascade_delete": true}' PowerShell curl --------------- .. code-block:: powershell curl.exe -X DELETE "https://api.jefoffice.com/playstore-download-histories-delete-one" -H "Content-Type: application/json" --data-raw "{\"download_history_id\": \"00000000-0000-4000-8000-000000000000\", \"cascade_delete\": true}" Status Polling -------------- After a cascade delete returns ``202 Accepted``, poll the status endpoint with the returned ``delete_job_id``. .. code-block:: json { "delete_job_id": "" } Status curl: .. code-block:: bat curl "https://api.jefoffice.com/playstore-download-histories-delete-one/status?delete_job_id=" Status PowerShell curl: .. code-block:: powershell curl.exe "https://api.jefoffice.com/playstore-download-histories-delete-one/status?delete_job_id=" Accepted Async Response ----------------------- .. code-block:: json { "ok": true, "is_deleted": false, "is_committed": false, "is_async": true, "operation": "delete-one", "method": "DELETE", "primary_key": "download_history_id", "primary_key_value": "00000000-0000-4000-8000-000000000000", "cascade_delete": true, "cascade_mode": "durable-job", "delete_job_id": "", "status": "running", "status_path": "/playstore-download-histories-delete-one/status", "message": "Cascade delete job accepted." } Expected Responses ------------------ .. list-table:: :header-rows: 1 :widths: 15 85 * - Status - Meaning * - 202 - Cascade delete job accepted. Use ``delete_job_id`` to poll status. * - 200 - Direct delete completed, or status endpoint returned the current job state. * - 400 - Missing primary key, missing ``delete_job_id`` on status check, or invalid payload. * - 404 - Item or delete job not found. * - 409 - Delete blocked because child records exist and cascade was not requested. * - 405 - Wrong HTTP method. * - 500 - Unexpected delete error. Cloudflare Worker Behavior -------------------------- Public clients call the Cloudflare URL only. The Worker forwards the request to AWS API Gateway and injects the internal AWS API key. Public examples must not include the AWS API key header. Durable Cascade Notes --------------------- - Cascade deletion uses a durable job with ``delete_job_id``. - Child-record checks must be query-backed. Table scans are not allowed for cascade safety. - Large cascades continue through status polling instead of a single blocking request.