Stay organized with collections
Save and categorize content based on your preferences.
To make any request to the Roads Selection API, you must include the following
information:
The number or ID of your Google Cloud project in the X-Goog-User-Project
header of the request. This value determines the project used for billing
and usage quota calculations.
An OAuth token in the Authorization header of the request. For more
information about using OAuth with the Roads Selection API, see Use
OAuth.
A Google Cloud project number or ID in the request URL. This value specifies
the project that contains the SelectedRoute resource. While this
project is usually the same as the project specified in the
X-Goog-User-Project header, it is not required to be the same.
The selectedRouteId in the request URL. Whenever you perform an
action on a specific SelectedRoute, you pass the ID of the selected
route as part of the request URL.
As a request example, the following code sample shows the structure of a request
to delete a selected route with all the elements previously mentioned:
As a request example, the following code sample shows the structure of a request
to delete a selected route with all the elements previously mentioned:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[],[],null,["# Request requirements\n\nTo make any request to the Roads Selection API, you must include the following\ninformation:\n\n- The number or ID of your Google Cloud project in the `X-Goog-User-Project` header of the request. This value determines the project used for billing and usage quota calculations.\n\n| **Note:** If you are using a service account for authentication, you can omit the `X-Goog-User-Project` header. For more information about service accounts, see [Authentication at\n| Google](https://cloud.google.com/docs/authentication).\n\n- An OAuth token in the `Authorization` header of the request. For more\n information about using OAuth with the Roads Selection API, see [Use\n OAuth](/maps/documentation/roads-management-insights/roads-selection/oauth-token).\n\n- A Google Cloud project number or ID in the request URL. This value specifies\n the project that contains the [`SelectedRoute`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#SelectedRoute) resource. While this\n project is usually the same as the project specified in the\n `X-Goog-User-Project` header, it is not required to be the same.\n\n- The **[`selectedRouteId`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes/create#body.selected_route_id)** in the request URL. Whenever you perform an\n action on a specific [`SelectedRoute`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#SelectedRoute), you pass the ID of the selected\n route as part of the request URL.\n\nAs a request example, the following code sample shows the structure of a request\nto [delete](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes/delete) a selected route with all the elements previously mentioned:\n\nAs a request example, the following code sample shows the structure of a request\nto delete a selected route with all the elements previously mentioned: \n\n```\ncurl -X DELETE \\\n-H 'X-Goog-User-Project: PROJECT_NUMBER' \\\n-H \"Authorization: Bearer ACCESS_TOKEN\" \\\n https://roads.googleapis.com/selection/v1/projects/PROJECT_NUMBER/selectedRoutes/SELECTED_ROUTE_ID\n```\n\nGet your project number\n-----------------------\n\nTo get the project number of your Google Cloud project:\n\n1. Go to the project's [Overview\n page](https://console.cloud.google.com/home/dashboard) in\n the Google Cloud console.\n\n2. If prompted, select your project.\n\n3. The **Project number** and **Project ID** appear in the **Project info**\n area of the overview screen."]]