Stay organized with collections
Save and categorize content based on your preferences.
Before you can run Connectivity Tests or configure VPC Flow Logs, you
must enable the Network Management API.
Enabling the API is required in order to use the API
itself, the Google Cloud CLI, or the Google Cloud console.
You can check API status or enable the API by using a gcloud command or by
using the Google Cloud console. You can also authorize users
to access the API.
Enable the API
Use one of the following methods to enable the API.
Console
When you load Connectivity Tests or VPC Flow Logs
in the Google Cloud console for the first time for a specific project. To enable
the API click Enable Network Management API.
gcloud
If you have not already installed the Google Cloud CLI on your workstation,
see the gcloud CLI documentation to do so.
To check if the Network Management API is enabled, run the following
command on your workstation:
gcloud services list
If networkmanagement.googleapis.com appears in the command output,
the API is enabled.
If the API is not enabled, run the following command to enable it.
For more information, see gcloud services.
Access to the Network Management API is controlled by Identity and Access Management
roles and permissions. Permissions for related methods are clustered into roles,
which you can then grant to users.
For more information, see the following documents:
You can test Network Management API commands by using the
API Explorer. In the Network Management API reference document,
use the Try this API column to explore API fields and
run a test.
[[["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-08-28 UTC."],[],[],null,["# Enable the Network Management API\n\nBefore you can run Connectivity Tests or configure VPC Flow Logs, you\nmust enable the Network Management API.\n\nEnabling the API is required in order to use the API\nitself, the Google Cloud CLI, or the Google Cloud console.\n\nYou can check API status or enable the API by using a `gcloud` command or by\nusing the Google Cloud console. You can also authorize users\nto access the API.\n\nEnable the API\n--------------\n\nUse one of the following methods to enable the API. \n\n### Console\n\nWhen you load Connectivity Tests or VPC Flow Logs\nin the Google Cloud console for the first time for a specific project. To enable\nthe API click **Enable Network Management API**.\n\n### gcloud\n\n1. If you have not already installed the Google Cloud CLI on your workstation,\n see the [gcloud CLI documentation](/sdk/docs) to do so.\n\n2. To check if the Network Management API is enabled, run the following\n command on your workstation:\n\n ```\n gcloud services list\n ```\n\n If `networkmanagement.googleapis.com` appears in the command output,\n the API is enabled.\n3. If the API is not enabled, run the following command to enable it.\n For more information, see [`gcloud services`](/sdk/gcloud/reference/services).\n\n ```\n gcloud services enable networkmanagement.googleapis.com\n ```\n\nAuthorize use of the API\n------------------------\n\nAccess to the Network Management API is controlled by Identity and Access Management\nroles and permissions. Permissions for related methods are clustered into roles,\nwhich you can then grant to users.\n\nFor more information, see the following documents:\n\n- [Roles and permissions](/network-intelligence-center/docs/connectivity-tests/concepts/access-control)\n- [Managing access control for Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/how-to/managing-access-control)\n\nUse the API Explorer\n--------------------\n\nYou can test Network Management API commands by using the API Explorer. In the Network Management API reference document, use the `Try this API` column to explore API fields and [run a test](/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest/v1/projects.locations.global.connectivityTests/create)."]]