--- title: "stopJob" slug: "security-websecuritychecker-stopjob" tags: ["Web Security Checker"] updated: 2026-10-22T10:47:53Z published: 2026-10-22T10:47:53Z canonical: "api-gov.ncloud-docs.com/security-websecuritychecker-stopjob" --- > ## Documentation Index > Fetch the complete documentation index at: https://api-gov.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # stopJob Classic/VPC 환경에서 이용 가능합니다. 네이버 클라우드 플랫폼 콘솔에서 사용자가 등록한 진단을 진행 중에 중지합니다. ## 요청 요청 형식을 설명합니다. 요청 형식은 다음과 같습니다. | 메서드 | URI | | --- | --- | | PATCH | /api/v1/{instanceId}/stop | ### 요청 헤더 Web Security Checker API에서 공통으로 사용하는 헤더에 대한 정보는 [Web Security Checker 요청 헤더](/docs/security-websecuritychecker#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 요청 경로 파라미터 요청 경로 파라미터에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `InstanceId` | Integer | Required | 진단 식별 번호 - [getJobs](/docs/security-websecuritychecker-getjobs) 또는 [searchJobs](/docs/security-websecuritychecker-searchjobs) 참조 | ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request PATCH 'https://wsc.apigw.gov-ntruss.com/api/v1/jobs/{instanceId}/stop' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/json' ``` ## 응답 응답 형식을 설명합니다. ### 응답 상태 코드 Web Security Checker API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [Web Security Checker 응답 상태 코드](/docs/security-websecuritychecker#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. - 진단 중지 작업 완료 ``` { "returnCode": "0", "returnDesc": "Request Success", "returnMessage": "Success", "resources": null } ``` - 진단 중지 작업 오류: 잘못된 `InstanceId`를 입력한 경우 ``` { "error": { "errorCode": 901, "message": "API Call Fail" } } ``` ## 샘플 코드 진단 진행 중 작업을 중지하려면 진단 검색 API와 진단 중지 API가 필요합니다. 진단 검색 API를 통해서 진단 진행 상태의 진단 중 작업 중지할 진단의 `instanceNo`의 값을 추출하고 이 값을 이용하여 중지 API를 요청해야 합니다. 진단 검색 및 `instanceNo` 확인 방법 및 해당 API의 샘플 코드에 대한 자세한 내용은 [getJobs](/docs/security-websecuritychecker-getjobs) 또는 [searchJobs](/docs/security-websecuritychecker-searchjobs)을 참조해 주십시오. 진단 검색 API(jobSearch)로 검색한 샘플 코드는 다음과 같습니다. - 검색 유형: `url` - 키워드: `target-domain.com` ``` # 요청 예시 $ python jobSearch.py "url target-domain.com" # 응답 예시 { "returnCode": "0", "returnDesc": "Request Success", "returnMessage": "Success", "resources": { "total_cnt": 1, "total_page_cnt": 1, "current_start_page": 1, "current_end_page": 1, "record_data": [ { "instanceNo": "1234567890", "start_date": "2024-07-10 13:42:38", "end_date": "", "status": "URL 수집중", "progress": null, "start_url": "http://target-domain.com", "crawl_cnt": "", "scan_cnt": "", "memo": "", "result_button": "terminate", "result_desc": "", "rescan_button": "", "slave_data": null } ] } } ``` make_signature 함수로 시그니처를 생성하여 요청 헤드를 생성한 후 입력한 요청 파라미터에 따라 진단하기 전에 취소하여 응답 코드가 200인 경우 결과를 출력하는 샘플 코드는 다음과 같습니다. ``` import sys import os import hashlib import hmac import base64 import requests import time import json from pprint import pprint def make_signature(method, uri, timestamp): access_key = "{accessKey}" # access key id (from portal or sub account) secret_key = "{secretKey}" # secret key (from portal or sub account) secret_key = bytes(secret_key, 'UTF-8') method = method uri = uri message = method + " " + uri + "\n" + timestamp + "\n" + access_key message = bytes(message, 'UTF-8') signingKey = base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest()) return signingKey method = 'PATCH' instanceId = "{instanceId}" # instance id (from api) uri = f'/api/v1/jobs/{instanceId}/stop' timestamp = str(int(time.time() * 1000)) signature = make_signature(method, uri, timestamp) headers = { 'x-ncp-apigw-signature-v2': signature.decode('utf-8'), 'x-ncp-apigw-timestamp': timestamp, 'x-ncp-iam-access-key': '{accessKey}', # access key id (from portal or sub account) 'Content-Type': 'application/json' } response = requests.request( method, f"https://wsc.apigw.gov-ntruss.com{uri}", headers=headers ) if response.status_code == 200: pprint(json.loads(response.text)) else: pprint(json.loads(response.text)) ``` 참고 샘플 코드는 Python3를 기반으로 작성했습니다. Java, Node.js 등 다른 언어로 작성한 샘플 코드는 API Gateway 사용 가이드의 [API 호출](https://guide-gov.ncloud-docs.com/beta/docs/api-gateway-myproducts#API%ED%98%B8%EC%B6%9C)을 참조해 주십시오.