Locate the API you wish to inspect. UseFilterto specify keywords to filter the list of APIs.
If needed, useSearchto locate an API.
Select an API.
Go to theVersionstables in theAPI detailspage.
Select an API version.
The API operations for the selected API version are listed in theOperationstable on the page.
REST
To list the API operations of an API version, use the following command:
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -X GET
https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations
Replace the following:
HUB_PROJECT: The project ID of the API hub project.
HUB_LOCATION: The location of the API hub project.
API_ID: The ID of the API.
VERSION_ID: The ID of the API version.
Example:
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -X GET
https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations
Get API operation
You can get the details of an API operation using theGet operationsAPI. These details include the name, specification, description, create time, update time, and user-defined attributes.
REST
To get the details of an API operation, use the following command:
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -X GET https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations/OPERATION_ID
Replace the following:
HUB_PROJECT: The project ID of the API hub project.
HUB_LOCATION: The location of the API hub project.
API_ID: The ID of the API.
VERSION_ID: The ID of the API version.
OPERATION_ID: The ID of the API operation.
Example:
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -X GET https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations/test-operation
When a valid OpenAPI specification is added to an API version containing existing operations, the operations defined in the specification will take precedence and replace the current ones.
What's next
See the API reference documentation for theOperationsAPI.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-08 UTC."],[],[],null,["*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\nThis pages describes how to create and manage API operations using the [Operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations) API. To learn more about operations, see [Introduction to API operations](/apigee/docs/apihub/operations-intro).\n\nAdd a operation to an API version\n\nYou can add an API operation to an existing [API version](./versions-intro) using the [Create operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/create) API. \n\nREST\n\nTo add a new API operation, use the following command: \n\n```\n curl --location --request POST \n 'https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations?api_operation_id=OPERATION_ID' \\\n--header 'Authorization: Bearer $(gcloud auth print-access-token)' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"details\":{\n \"description\":\"DESCRIPTION\",\n \"deprecated\":false,\n \"documentation\":{\n \"external_uri\":\"EXTERNAL_URI\"\n },\n \"http_operation\":{\n \"method\":\"METHOD\",\n \"path\":{\n \"path\":\"PATH\",\n \"description\":\"DESCRIPTION\"\n }\n }\n }\n}'\n\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHUB_PROJECT\u003c/var\u003e: The project ID of the API hub project.\n- \u003cvar translate=\"no\"\u003eHUB_LOCATION\u003c/var\u003e: The location of the API hub project.\n- \u003cvar translate=\"no\"\u003eAPI_ID\u003c/var\u003e: The ID of the API.\n- \u003cvar translate=\"no\"\u003eVERSION_ID\u003c/var\u003e: The ID of the API version.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: The ID of the API operation.\n- \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: The description of the API operation.\n- \u003cvar translate=\"no\"\u003eEXTERNAL_URI\u003c/var\u003e: The external URI of the API operation.\n- \u003cvar translate=\"no\"\u003eMETHOD\u003c/var\u003e: The method of the API operation.\n- \u003cvar translate=\"no\"\u003ePATH\u003c/var\u003e: The path of the API operation.\n\nExample: \n\n```\n curl --location --request POST \n 'https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations?api_operation_id=test-operation' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"details\":{\n \"description\":\"api to create root level entity api in apihub\",\n \"deprecated\":false,\n \"documentation\":{\n \"external_uri\":\"https://google.com\"\n },\n \"http_operation\":{\n \"method\":\"POST\",\n \"path\":{\n \"path\":\"/apis\",\n \"description\":\"It is ccfe managed resource\"\n }\n }\n }\n }'\n \n```\n\nUpdate an API operation\n\n\nYou can update an API operation using the [Patch operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch) API. \n\nREST\n\nTo update an API operation, use the following command: \n\n```\n curl --location --request PATCH 'https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations/OPERATION_ID?update_mask=UPDATE_MASK' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)' \\\n --data '{\n \"details\":{\n \"description\":\"DESCRIPTION\",\n \"deprecated\":false,\n \"documentation\":{\n \"external_uri\":\"EXTERNAL_URI\"\n },\n \"http_operation\":{\n \"method\":\"METHOD\",\n \"path\":{\n \"path\":\"PATH\",\n \"description\":\"DESCRIPTION\"\n }\n }\n }\n }'\n \n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHUB_PROJECT\u003c/var\u003e: The project ID of the API hub project.\n- \u003cvar translate=\"no\"\u003eHUB_LOCATION\u003c/var\u003e: The location of the API hub project.\n- \u003cvar translate=\"no\"\u003eAPI_ID\u003c/var\u003e: The ID of the API.\n- \u003cvar translate=\"no\"\u003eVERSION_ID\u003c/var\u003e: The ID of the API version.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: The ID of the API operation.\n- \u003cvar translate=\"no\"\u003eUPDATE_MASK\u003c/var\u003e: The update mask of the API operation.\n- \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: The description of the API operation.\n- \u003cvar translate=\"no\"\u003eEXTERNAL_URI\u003c/var\u003e: The external URI of the API operation.\n- \u003cvar translate=\"no\"\u003ePATH\u003c/var\u003e: The path of the API operation.\n\nExample: \n\n```\n curl --location --request PATCH \n 'https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations/test-operation?update_mask=details.http_operation.path' \\\n--header 'Authorization: Bearer $(gcloud auth print-access-token)' \\\n--data '{\n \"details\":{\n \"description\":\"api to create root level entity api in apihub update\",\n \"deprecated\":false,\n \"documentation\":{\n \"external_uri\":\"https://google.com\"\n },\n \"http_operation\":{\n \"method\":\"POST\",\n \"path\":{\n \"path\":\"/apiss\",\n \"description\":\"It is ccfe managed api\"\n }\n }\n }\n}'\n```\n\nDelete an API operation\n\n\nYou can delete an API operation using the [Delete operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/delete) API. \n\nREST\n\nTo delete an API operation, use the following command: \n\n```\n curl --location --request DELETE 'https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations/OPERATION_ID' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)'\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHUB_PROJECT\u003c/var\u003e: The project ID of the API hub project.\n- \u003cvar translate=\"no\"\u003eHUB_LOCATION\u003c/var\u003e: The location of the API hub project.\n- \u003cvar translate=\"no\"\u003eAPI_ID\u003c/var\u003e: The ID of the API.\n- \u003cvar translate=\"no\"\u003eVERSION_ID\u003c/var\u003e: The ID of the API version.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: The ID of the API operation.\n\nExample: \n\n```\n curl --location --request DELETE 'https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations/test-operation' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)'\n```\n\nList API operations\n\nYou can list or view the API operations of an API version using the API hub console UI or using the [List operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/list) API. \n\nConsole\n\nTo view the API operations of an API version, do the following:\n\n1. In the Google Cloud console, go to the **API hub** page.\n\n [Go to API hub](https://console.cloud.google.com/apigee/api-hub/apis)\n2. Click **APIs**.\n3. Locate the API you wish to inspect. Use [Filter](./search-apis#filter) to specify keywords to filter the list of APIs. If needed, use [Search](./search-apis) to locate an API.\n4. Select an API.\n5. Go to the **Versions** tables in the **API details** page.\n6. Select an API version.\n7. The API operations for the selected API version are listed in the **Operations** table on the page.\n\nREST\n\nTo list the API operations of an API version, use the following command: \n\n```\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -X GET \n https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHUB_PROJECT\u003c/var\u003e: The project ID of the API hub project.\n- \u003cvar translate=\"no\"\u003eHUB_LOCATION\u003c/var\u003e: The location of the API hub project.\n- \u003cvar translate=\"no\"\u003eAPI_ID\u003c/var\u003e: The ID of the API.\n- \u003cvar translate=\"no\"\u003eVERSION_ID\u003c/var\u003e: The ID of the API version.\n\nExample: \n\n```\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -X GET \n https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations\n```\n\nGet API operation\n\n\nYou can get the details of an API operation using the [Get operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/get) API. These details include the name, specification, description, create time, update time, and user-defined attributes. \n\nREST\n\nTo get the details of an API operation, use the following command: \n\n```\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -X GET https://apihub.googleapis.com/v1/projects/HUB_PROJECT/locations/HUB_LOCATION/apis/API_ID/versions/VERSION_ID/operations/OPERATION_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHUB_PROJECT\u003c/var\u003e: The project ID of the API hub project.\n- \u003cvar translate=\"no\"\u003eHUB_LOCATION\u003c/var\u003e: The location of the API hub project.\n- \u003cvar translate=\"no\"\u003eAPI_ID\u003c/var\u003e: The ID of the API.\n- \u003cvar translate=\"no\"\u003eVERSION_ID\u003c/var\u003e: The ID of the API version.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: The ID of the API operation.\n\nExample: \n\n```\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -X GET https://apihub.googleapis.com/v1/projects/test-project/locations/us-central1/apis/test-api/versions/version-id/operations/test-operation\n```\n\nConsiderations\n\n- For API versions with a [valid OpenAPI specification](/apigee/docs/apihub/validate-spec) and parsed operations, the [Operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations) API can't be used to add, modify, or delete operations.\n- When a valid OpenAPI specification is added to an API version containing existing operations, the operations defined in the specification will take precedence and replace the current ones.\n\nWhat's next\n\n- See the API reference documentation for the [Operations](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations) API.\n- Learn more about [API specifications](/apigee/docs/apihub/spec-intro).\n- Learn more about [API operations](/apigee/docs/apihub/operations-intro)."]]