AI-generated Key Takeaways
-
This API call retrieves a list of cities, which can be filtered using query parameters.
-
The HTTP request uses a GET method to the specified URL, including a profile ID in the path.
-
Optional query parameters like
namePrefix,countryDartIds,dartIds, andregionDartIdscan be used to refine the city list. -
The request body must be empty.
-
The response body contains a JSON object with the
kindandcitiesfields, wherecitiesis an array of city objects.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Retrieves a list of cities, possibly filtered.
HTTP request
GET https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/{profileId}/cities
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
profileId |
User profile ID associated with this request. |
Query parameters
| Parameters | |
|---|---|
namePrefix |
Select only cities with names starting with this prefix. |
countryDartIds[] |
Select only cities from these countries. |
dartIds[] |
Select only cities with these DART IDs. |
regionDartIds[] |
Select only cities from these regions. |
Request body
The request body must be empty.
Response body
City cities.list Response
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"kind": string,
"cities": [
{
object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: the fixed string
. |
cities[] |
City collection. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/dfatrafficking