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"]],["最后更新时间 (UTC):2025-08-27。"],[[["\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```"]]