Shadow API Discovery에 대한 개요와 Cloud 콘솔에서 Apigee UI를 사용하여 이를 관리하는 방법은 Shadow API Discovery를 참조하세요.
Shadow API Discovery의 일반적인 동작 및 제한사항에 대한 정보는 동작 및 제한사항에서 확인할 수 있습니다.
참조 API 호출의 파라미터
이 페이지의 API 호출은 Apigee 계정 정보(예: 프로젝트) 또는 관찰 작업을 만들 때 사용되는 정보를 참조하는 다음 파라미터를 사용할 수 있습니다. 이러한 각 필드에 대한 자세한 내용은 관찰 작업 만들기를 참조하세요.
OBSERVATION_JOB_LOCATION은 관찰 작업의 위치입니다.
OBSERVATION_JOB_NAME은 관찰 작업의 이름입니다.
OBSERVATION_SOURCE_LOCATION는 관찰 작업의 소스 위치입니다.
OBSERVATION_SOURCE_NAME은 관찰 소스의 이름입니다.
PROJECT는 Apigee 프로젝트입니다.
관찰 작업 만들기
관찰 작업을 만들려면 여러 단계/API 요청이 필요합니다.
관찰 소스 만들기: 기존 관찰 소스를 사용하는 대신 새 관찰 소스를 만들려면 관찰 소스 세부정보를 사용하여 observationSources 엔드포인트에 POST 요청을 수행합니다.
curl https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationJobs/OBSERVATION_JOB_NAME/apiObservations \
-X GET
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-21(UTC)"],[[["\u003cp\u003eThis page provides reference syntax for managing Apigee Shadow API Discovery using the Apigee Management (APIM) APIs, with links to related documentation.\u003c/p\u003e\n"],["\u003cp\u003eShadow API Discovery is a Pre-GA feature with limited support, available "as is," as detailed in the Pre-GA Offerings Terms.\u003c/p\u003e\n"],["\u003cp\u003eThe API calls on this page use parameters like \u003ccode\u003eOBSERVATION_JOB_LOCATION\u003c/code\u003e, \u003ccode\u003eOBSERVATION_JOB_NAME\u003c/code\u003e, \u003ccode\u003eOBSERVATION_SOURCE_LOCATION\u003c/code\u003e, \u003ccode\u003eOBSERVATION_SOURCE_NAME\u003c/code\u003e, and \u003ccode\u003ePROJECT\u003c/code\u003e to manage observation jobs and sources.\u003c/p\u003e\n"],["\u003cp\u003eManaging Shadow API discovery involves steps such as creating observation sources and jobs, enabling or disabling them, viewing discovered APIs, and managing tags on observation results.\u003c/p\u003e\n"],["\u003cp\u003eObservation jobs and sources can be deleted using the provided API requests, allowing for the removal of unnecessary jobs and sources.\u003c/p\u003e\n"]]],[],null,["# Shadow API Discovery: management APIs\n\nOverview\n--------\n\n|\n| **Preview\n| --- Shadow API Discovery**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page provides reference syntax for managing Apigee Shadow API Discovery from the Apigee\nManagement (APIM) APIs. Documentation for the Management APIs related to Shadow API Discovery,\nincluding information on each field in a request, can be found at\n\u003chttps://cloud.google.com/apigee/docs/reference/apis/apim/rest\u003e\nand\n\u003chttps://cloud.google.com/apigee/docs/reference/apis/apim/rpc\u003e\n\nFor an overview of Shadow API Discovery and instructions for managing it using the Apigee UI in Cloud\nconsole, see\n[Shadow API discovery](/apigee/docs/api-observation/shadow-api-discovery).\nInformation on the general behaviors and limitations of Shadow API Discovery is in\n[Behaviors and limitations](/apigee/docs/api-observation/shadow-api-discovery#behaviors-and-limitations).\n\nParameters in reference API calls\n---------------------------------\n\nThe API calls on this page can use the following parameters, which refer to either your\nApigee account information (such as your project) or information used when creating observation\njobs. See\n[Create observation jobs](/apigee/docs/api-observation/shadow-api-discovery#create-observation-jobs)\nfor more information on each of these fields.\n\n- \u003cvar translate=\"no\"\u003eOBSERVATION_JOB_LOCATION\u003c/var\u003e is a location for an observation job.\n- \u003cvar translate=\"no\"\u003eOBSERVATION_JOB_NAME\u003c/var\u003e is an observation job name.\n- \u003cvar translate=\"no\"\u003eOBSERVATION_SOURCE_LOCATION\u003c/var\u003e is a source location for the observation job.\n- \u003cvar translate=\"no\"\u003eOBSERVATION_SOURCE_NAME\u003c/var\u003e is an observation source name.\n- \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e is your Apigee project.\n\nCreate an observation job\n-------------------------\n\nCreating an observation job requires multiple steps/API requests.\n\n1. **Create an observation source:** To create a new observation source rather than using an existing one, make a POST request to the observationSources endpoint with the observation source details. \n\n ```\n curl \\ https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_SOURCE_LOCATION/observationSources?observation_source_id=OBSERVATION_SOURCE_NAME \\\n -X POST \\\n -H 'Content-type: application/json' \\\n -d @- \u003c\u003c'EOF'\n {\n \"gclbObservationSource\": {\n \"pscNetworkConfigs\": [\n {\n \"network\": \"projects/PROJECT/global/networks/{network_name}\",\n \"subnetwork\":\"projects/PROJECT/regions/OBSERVATION_SOURCE_LOCATION/subnetworks/{subnet_name}\"\n }\n ]\n }\n }\n EOF\n ```\n Creation of an observation source requires several minutes and starts an [LRO](https://google.aip.dev/151), with a response like this: \n\n ```\n {\n \"name\": \"projects/{project/locations/OBSERVATION_SOURCE_LOCATION/operations/operation-\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apim.vl.ApiDiscoveryOperationMetadata\",\n \"createTime\": \"\",\n \"target\": \"projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eOBSERVATION_SOURCE_LOCATION\u003c/var\u003e/observationSources/\u003cvar translate=\"no\"\u003eOBSERVATION_SOURCE_NAME\u003c/var\u003e\",\n \"verb\": \"create\",\n \"requestedCancellation\": false,\n \"apiVersion\": \"vl\"\n },\n \"done\": false\n }\n ```\n2. To view the newly created observation source: \n\n ```\n curl \\\n https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_SOURCE_LOCATION/observationSources/OBSERVATION_SOURCE_NAME\n ```\n3. **Create an observation job:** Create a job that looks for shadow APIs using the source you just created: \n\n ```\n curl \\\n https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationJobs?observation_job_id=OBSERVATION_JOB_NAME \\\n -X POST \\\n -H 'Content-type: application/json' \\\n -d @- \u003c\u003c'EOF'\n {\n \"sources\": [\n \"projects/PROJECT/locations/OBSERVATION_SOURCE_LOCATION/observationSources/OBSERVATION_SOURCE_NAME\"\n ]\n }\n EOF\n ```\n\nEnable an observation job\n-------------------------\n\nUse the following command to enable a new observation job or a disabled existing job. \n\n```\ncurl https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationJobs/OBSERVATION_JOB_NAME:enable \\\n-X POST \\\n-H 'Content-type: application/json' \\\n-d @- \u003c\u003c'EOF'\n{}\nEOF\n```\n\nView discovered APIs\n--------------------\n\nTo view APIs discovered by enabled observation jobs, submit this command: \n\n```\ncurl https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationJobs/OBSERVATION_JOB_NAME/apiObservations \\\n-X GET\n```\n\nManage tags on observation results\n----------------------------------\n\nTo list the tags already added to results: \n\n```\ncurl -H \"https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION:listApiObservationTags\"\n \n```\n\nTo manage tags: \n\n```\ncurl -H \"Content-Type: appication/json\" \\\n\"https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationJobs/OBSERVATION_JOB_NAME/apiObservations:batchEditTags\" \\\n-X POST -d @- \u003c\u003c'EOF'\n{\n \"requests\": [\n {\n \"apiObservationId\": \"API_OBSERVATION_ID\",\n \"tagActions\": [\n {\n \"tag\": \"demo\",\n \"action\": \"REMOVE\"\n },\n {\n \"tag\": \"Needs Attentions\",\n \"action\": \"ADD\"\n }]\n }\n ]\n}\nEOF\n```\n\nDisable an observation job\n--------------------------\n\nThis request disables an observation job without deleting it. \n\n```\ncurl https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationsJobs/OBSERVATION_JOB_NAME:disable \\\n-X POST \\\n-H 'Content-type: application/json' \\\n-d @- \u003c\u003c'EOF'\n{\n}\n```\n\nDelete an observation job\n-------------------------\n\nThis request deletes an observation job. \n\n```\ncurl -X DELETE https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_JOB_LOCATION/observationJobs/OBSERVATION_JOB_NAME\n```\n\nDelete an observation source\n----------------------------\n\nThis request deletes an observation source. \n\n```\ncurl -X DELETE https://apim.googleapis.com/v1alpha/projects/PROJECT/locations/OBSERVATION_SOURCE_LOCATION/observationSources/OBSERVATION_SOURCE_NAME\n```"]]