https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/items/{item_id}
A webmap containing a custom basemap style allows you to share your own unique basemap color scheme to emphasize geographic features and labels or match specific branding.
To create a new custom basemap style, use the ArcGIS Vector Tile Style Editor. The editor copies an existing style and allows you to start editing the new style. The editor provides tools that let you inspect and set the visual properties for all of the features and labels in each layer. When you save the custom basemap style, a portal item is created which you can share. For more information about creating custom basemap styles, see Custom basemap styles.
Note that the ArcGIS Vector Tile Style Editor provides basemap tiles served by the ibasemaps-api.arcgis.com and basemaps-api.arcgis.com domains. The attribution, minimum and maximum lod, and the tiling scheme of these services are always available. If you edit the custom basemap style JSON to add different domains, these properties will not be present.
Note that when you make changes to your custom style, it can take up to 10 minutes for the changes to be available via this endpoint.
You cannot fetch a custom style with a session token, but if necessary, you can fetch the underlying basemap tiles with a session token.
Query parameters
Name | Type | Required | Default value | Description |
---|---|---|---|---|
token | string |
| The authentication token, used to access the Basemap styles service. | |
f | string | json | An optional parameter to specify the format in which the response is given. It can either be json or pjson. | |
echoToken | boolean |
| An optional parameter to control whether the response includes the token to access style resources. |
token
The authentication token, used to access the Basemap styles service.
The token
parameter can be:
- an API key
- a short-lived token
- a session token generated by the
sessions/start
endpoint
API keys and short-lived tokens must be created from an account with the
premium:user:basemaps
privilege.
Session tokens must be created from an ArcGIS Location Platform account
with the premium:user:basemaps
privilege.
Note that session tokens cannot be used with the sessions/start
endpoint or to fetch custom styles.
Developer guide: To learn more, go to Security and authentication.
This parameter is required unless you supply an access token in the request header with one of the following keys using the "Bearer" scheme:
Authorization: Bearer <YOUR_TOKEN>
X-Esri-Authorization: Bearer <YOUR_TOKEN>
f
An optional parameter to specify the format in which the response is given. It can either be json or pjson.
- Default
- json
Enumerated values
echoToken
An optional parameter to control whether the response includes the token to access style resources.
If the echoToken
parameter is not provided, the basemap styles
response defaults to automatically including the token. If echoToken
is provided with a false value, the response will not include the token.
In this case, the token must be included with all tile and glyph
requests. This approach is more secure.
- Default
- true
Path parameters
Name | Type | Required | Description |
---|---|---|---|
item_id | string | Portal item unique identifier representing a single content item in the ArcGIS portal. |
item_id
Portal item unique identifier representing a single content item in the ArcGIS portal. The portal item must be of type Tile Layer (based on either a Map Service or Vector Tile Service). See ArcGIS Glossary for more information about portal item IDs. See ArcGIS item types for more information about item types.
- Minimum length
- 32
- Maximum length
- 32
Response status
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A successful response for a webmap request. | Webmap |
400 | Bad Request | Invalid query parameters / Incorrect portal item type. | Error |
401 | Unauthorized | Authentication Error. The API key or token is missing, invalid or expired. | Error |
403 | Forbidden | The requested resource cannot be accesed because of incorrent sharing permissions. | Error |
404 | Not Found | A portal item with the supplied ID was not found. | Error |
5XX | **Server Error** | An error occurred on the server. | Error |
Examples
Request
# You can also use wget
curl -X GET https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/items/be070defddef468b8bf0a43bde321ab5 \
-H 'Authorization: Bearer <YOUR_TOKEN>'