/styles/items/{item_id}

Click to copy

Portal item as a Style

Returns a style showing the supplied portal item. The portal item must be of type Tile Layer (based on either a Map Service or Vector Tile Service).

Once a custom style has been retrieved from the service it may be cached. If you make changes to the style it could take up to 10 minutes for the changes to be available.

Query parameters

NameTypeRequiredDefault valueDescription

string

The authentication token, used to access the Basemap styles service.

string

json

Optional, case-sensitive parameter to specify the format in which responses are given. Can either be json or pjson.

token

The authentication token, used to access the Basemap styles service.

The token parameter can be either an API Key or short-lived token.

Alternatively, you can supply a 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>

The provided token must have the necessary premium:user:basemaps privilege to use the basemap style service.

Developer guide: To learn more, go to Security and authentication.

f

Optional, case-sensitive parameter to specify the format in which responses are given. Can either be json or pjson.

Default
json
Enumerated values
json
Click to copy
pjson
Click to copy

Path parameters

NameTypeRequiredDefault valueDescription

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.

Examples

Request

Use dark colors for code blocksCopy
1
2
3
# You can also use wget
curl -X GET https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/items/{item_id} \
  -H 'Accept: application/json'

Response

200 Response

Use dark colors for code blocksCopy
1
{}
StatusMeaningDescriptionSchema

200

OK

A successful response to a style request.

Style

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

Unknown

An error occurred on the server.

Error

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.