From 34e3911a97c2c68fdba0651640b17f9219d86b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adem=C3=ADlson=20Tonato?= Date: Fri, 24 Jan 2025 16:16:04 +0000 Subject: [PATCH] docs: update cancel crawl response - add cancel crawl event to requests.http --- apps/api/requests.http | 5 +++++ apps/api/v1-openapi.json | 22 ++++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/apps/api/requests.http b/apps/api/requests.http index d8cc3633..f7b7de9c 100644 --- a/apps/api/requests.http +++ b/apps/api/requests.http @@ -28,6 +28,11 @@ content-type: application/json GET {{baseUrl}}/v1/crawl/{{crawlId}} HTTP/1.1 Authorization: Bearer {{$dotenv TEST_API_KEY}} +### Cancel Crawl +@crawlId = {{crawl.response.body.$.id}} +# @name cancelCrawl +DELETE {{baseUrl}}/v1/crawl/{{crawlId}} HTTP/1.1 +Authorization: Bearer {{$dotenv TEST_API_KEY}} ### Batch Scrape Websites # @name batchScrape diff --git a/apps/api/v1-openapi.json b/apps/api/v1-openapi.json index 9aab05c9..ba22f570 100644 --- a/apps/api/v1-openapi.json +++ b/apps/api/v1-openapi.json @@ -840,19 +840,16 @@ ], "responses": { "200": { - "description": "Successful cancellation", + "description": "Crawl job successfully cancelled", "content": { "application/json": { "schema": { "type": "object", "properties": { - "success": { - "type": "boolean", - "example": true - }, - "message": { + "status": { "type": "string", - "example": "Crawl job successfully cancelled." + "enum": ["cancelled"], + "example": "cancelled" } } } @@ -988,19 +985,16 @@ ], "responses": { "200": { - "description": "Successful cancellation", + "description": "Crawl job successfully cancelled", "content": { "application/json": { "schema": { "type": "object", "properties": { - "success": { - "type": "boolean", - "example": true - }, - "message": { + "status": { "type": "string", - "example": "Crawl job successfully cancelled." + "enum": ["cancelled"], + "example": "cancelled" } } }