Table of contents
Saved Views

Saved Views

Download API definition:

GET https://api.bentley.com/savedviews/{savedViewId}

Retrieves a saved view. Extension data is returned as a list of links to query further. If you want to obtain the full saved view data, including extension data, use the Prefer header with return=representation.

Authentication

Requires Authorization header with valid Bearer token for scope savedviews:read or itwin-platform.

For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.

Request parameters

Name
In
Required?
Description
savedViewId
template
Yes

Request headers

Name
Required?
Description
Prefer
No

Controls the returned data. Setting to return=representation will return the saved view with all the extension data in a single payload. Setting to return=minimal will return the saved view with the list of extensions that exist and links to query those separately.

Authorization
Yes

OAuth access token with savedviews:read or itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Response 200 OK

Specified saved view.

json
{
    "savedView": {
        "id": "ACZbDmWhULVChRcDRkoPdLaNv7DGPQORQpkxmyDyE1ERZS7bsqUkWEmr9ZGmC5TopQ",
        "displayName": "Test Name",
        "shared": false,
        "tags": [{
            "displayName": "Tag Test Name",
            "id": "ABRBqKCBtXZCl_ax5ZFB9uaNv7DGPQORQpkxmyDyE1ERZS7bsqUkWEmr9ZGmC5TopQ"
        }],
        "extensions": [{
            "extensionName": "MyExtension",
            "href": "https://api.bentley.com/path1/path2/id"
        }],
        "_links": {
            "iTwin": {
                "href": "https://api.bentley.com/path1/path2/id"
            },
            "imodel": {
                "href": "https://api.bentley.com/path1/path2/id"
            },
            "creator": {
                "href": "https://api.bentley.com/path1/path2/id"
            },
            "group": {
                "href": "https://api.bentley.com/path1/path2/id"
            },
            "image": {
                "href": "https://api.bentley.com/path1/path2/id"
            },
            "thumbnail": {
                "href": "https://api.bentley.com/path1/path2/id"
            }
        },
        "savedViewData": {
            "itwin3dView": {
                "origin": [
                    0,
                    0,
                    0
                ],
                "extents": [
                    100,
                    100,
                    100
                ],
                "angles": {
                    "yaw": 90,
                    "pitch": 90,
                    "roll": 90
                },
                "camera": {
                    "lens": 90,
                    "focusDist": 1,
                    "eye": [
                        0,
                        0,
                        0
                    ]
                },
                "categories": {
                    "enabled": [
                        "0x12",
                        "0x13"
                    ],
                    "disabled": [
                        "0x14",
                        "0x15"
                    ]
                },
                "models": {
                    "enabled": [
                        "0x12",
                        "0x13"
                    ],
                    "disabled": [
                        "0x14",
                        "0x15"
                    ]
                }
            }
        }
    }
}

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 404 Not Found

Requested savedview is not available.

json
{
    "error": {
        "code": "SavedViewNotFound",
        "message": "Requested savedview is not available."
    }
}

Response 429 Too many requests

This response indicates that the user has sent too many requests in a given amount of time.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

Link

TableSchema
Name
Type
Description
href
String

Http reference

ViewYawPitchRoll

TableSchema
Name
Type
Description
yaw
Number

Yaw (rotation of x towards y) of the orientation, in degrees

pitch
Number

Pitch (rotation that raises x towards z) of the orientation, in degrees

roll
Number

Roll (rotation of y towards z) of the orientation, in degrees

ViewCamera

TableSchema
Name
Type
Description
lens
Number

Angle of the camera lens, in degrees

focusDist
Number

Focal distance of the lens, in meters

eye
Number[]

Location of the eye of the camera. (Array of numbers representing x, y and z)

ViewVisibilityList

TableSchema
Name
Type
Description
enabled
String[]

List of Ids that should be enabled/visible.

disabled
String[]

List of Ids that should be disabled/hidden.

ViewItwin3d

TableSchema
Name
Type
Description
origin
Number[]

The lower left back corner of the view frustum. (Array of numbers representing x, y and z)

extents
Number[]

The extent of the view frustum. (Array of numbers representing x, y and z)

ViewItwinSheet

TableSchema
Name
Type
Description
baseModelId
String

Base model Id

origin
Number[]

Origin. (Array of numbers representing x and y)

delta
Number[]

Delta. (Array of numbers representing x and y)

angle
Number

Angle, in degrees.

width
Number

Width of the sheet, in meters

height
Number

Height of the sheet, in meters

scale
Number

Scale of the sheet

sheetTemplate
String

Sheet template Id

sheetAttachments
String[]

List of Ids

ViewItwinDrawing

TableSchema
Name
Type
Description
baseModelId
String

Base model Id

origin
Number[]

Origin. (Array of numbers representing x and y)

delta
Number[]

Delta. (Array of numbers representing x and y)

angle
Number

Angle, in degrees.

spatialView
String

The Id of the spatial view from which the SectionDrawing was generated.

displaySpatialView
Boolean

If true, the spatial view should be displayed in the context of the drawing view.

drawingToSpatialTransform
Array[]

Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. 3 X 4 transformation matrix containing 3 arrays of matrix rows consisting of 4 numbers each: [qx qy qz ax] where the fourth columnn in each row holds the translation.

modelExtents
Array[]

The extents of the DrawingModel, used for determining the upper limits of the view's extents.

SavedViewTag

TableSchema
Name
Type
Description
id
String

Linked Tag identifier

displayName
String

SavedViewLinks

TableSchema
Name
Type
Description
iTwin
imodel
creator
group
image
thumbnail

ViewWithLegacy

TableSchema
Name
Type
Description
itwin3dView
itwinSheetView
itwinDrawingView
legacyView
Object

Legacy data, un-updatable, will soon be deprecated move to new service

SavedViewResponse

TableSchema
Name
Type
Description

ViewFlagProps

TableSchema
Name
Type
Description
noConstructions
Boolean

If true, don't show construction class.

noDimensions
Boolean

If true, don't show dimension class.

noPattern
Boolean

If true, don't show patterns.

noWeight
Boolean

If true, don't line weights.

noStyle
Boolean

If true, don't line styles.

noTransparency
Boolean

If true, don't use transparency.

noFill
Boolean

If true, don't show filled regions.

noTexture
Boolean

If true, don't show textures.

noMaterial
Boolean

If true, don't show materials.

visibleEdges
Boolean

If true, show visible edges.

hiddenEdges
Boolean

If true, show hidden edges.

shadows
Boolean

If true, show shadows.

clipVolume
Boolean

If true, use the view's clipping volume. Has no effect on other types of clips like ModelClipGroups.

hiddenLineMaterialColors
Boolean

If true, use hidden line material colors.

monochrome
Boolean

If true, show view with monochrome settings.

renderMode
String

Render mode.

backgroundMap
Boolean

Display background map.

ambientOcclusion
Boolean

If true, show ambient occlusion.

RgbColorProps

TableSchema
Name
Type
Description
red
Number

Red value between [0, 255]

green
Number

Green value between [0, 255]

blue
Number

Blue value between [0, 255]

DisplayStyleSubCategoryProps

TableSchema
Name
Type
Description
invisible
Boolean

Whether the subcategory is invisible or not.

weight
Number

The line width in pixels. Must be a value between [1,32].

style
String

Style Id to use.

priority
Number

Priority.

material
String

Material Id to use.

transparency
Number

Transparency. Must be a value in the range [0,1]. 0.0 means fully opaque, and 1.0 means fully transparent.

transparencyFill
Number

Fill transparency. Must be a value in the range [0,1]. 0.0 means fully opaque, and 1.0 means fully transparent.

subCategory
String

The Id of the SubCategory whose appearance is to be overridden.

TerrainProps

TableSchema
Name
Type
Description
providerName
String

Identifies the provider currently only CesiumWorldTerrain is supported.

exaggeration
Number

A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration.

applyLighting
Boolean

Applying lighting can help to visualize subtle terrain variation.

heightOrigin
Number

Origin value - height of the IModel origin at the project center as defined by heightOriginMode.

heightOriginMode
String

Determines how/if the heightOrigin is applied to the terrain height.

PlanarClipMaskProps

TableSchema
Name
Type
Description
mode
String

Controls how the mask geometry is collected.

modelIds
String

Compressed Id set containing the model Ids.

subCategoryOrElementIds
String

Compressed Id set containing the sub category or element Ids.

priority
String

The priority of the planar clip mask.

transparency
Number

The transparency of the planar clip mask. Between 0 (complete masking) and 1 (no masking).

invert
Boolean

A value of true indicates that the mask should be inverted and only content within the mask should be displayed.

BackgroundMapProps

TableSchema
Name
Type
Description
groundBias
Number

The elevation of the map in meters relative the WGS84 ellipsoid.

transparency
Object

A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.

useDepthBuffer
Boolean

If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry.

applyTerrain
Boolean

If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane.

terrainSettings
globeMode
String

Globe Mode.

nonLocatable
Boolean

If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it allows the user to select elements that are behind the map.

planarClipMask

RealityDataSourceKey

TableSchema
Name
Type
Description
provider
String

The provider that supplies the access to reality data source for displaying the reality model.

format
String

The format used by the provider to store the reality data.

id
String

The reality data id that identify a reality data for the provider.

iTwinId
String

The context id that was used when reality data was attached - if none provided, current session iTwinId will be used.

SpatialClassifierFlagsProps

TableSchema
Name
Type
Description
inside
String

Describes how a SpatialClassifier affects the display of classified geometry - that is, geometry intersecting the classifier.

outside
String

Describes how a SpatialClassifier affects the display of unclassified geometry - that is, geometry not intersecting the classifier.

isVolumeClassifier
Boolean

True for volume classification; false for planar classification.

SpatialClassifierProps

TableSchema
Name
Type
Description
modelId
String

The Id of the GeometricModel whose geometry is used to produce the classifier.

expand
Number

A distance in meters by which to expand the classifier geometry. For example, if line strings are used to represent streets, you might expand them to the average width of a street.

name
String

A user-friendly name, useful for identifying individual classifiers within a SpatialClassifiers.

isActive
Boolean

Records whether this is the active classifier.

FeatureAppearanceProps

TableSchema
Name
Type
Description
weight
Number

The line weight in pixels as an integer in [1, 31]

transparency
Number

The transparency in the range [0.0, 1.0] where 0 indicates fully opaque and 1 indicates fully transparent.

linePixels
String

The pixel pattern used to draw lines.

ignoresMaterial
Boolean

If true, ignore the RenderMaterial associated with surfaces.

nonLocatable
Boolean

If true, the associated Feature will not be drawn when using Viewport.readPixels.

emphasized
Boolean

If true, the associated Feature will be emphasized. Emphasized features are rendered using the Hilite.Settings defined by Viewport.emphasisSettings

ContextRealityModelProps

TableSchema
Name
Type
Description
realityDataSourceKey
tilesetUrl
String

The URL that supplies the 3d tiles for displaying the reality model.

realityDataId
String

Id of reality data.

name
String

An optional, user-friendly name for the reality model suitable for display in a user interface.

description
String

An optional, user-friendly description of the reality model suitable for display in a user interface.

classifiers

List of SpatialClassifierProps.

planarClipMask
appearanceOverrides

MapImageryProps

TableSchema
Name
Type
Description
backgroundBase
Object

The settings for the base layer.

backgroundLayers
Object[]

Background layer settings.

overlayLayers
Object[]

Overlay layer settings.

DisplayStyleModelAppearanceProps

TableSchema
Name
Type
Description
weight
Number

The line weight in pixels as an integer in [1, 31]

transparency
Number

The transparency in the range [0.0, 1.0] where 0 indicates fully opaque and 1 indicates fully transparent.

linePixels
String

The pixel pattern used to draw lines.

ignoresMaterial
Boolean

If true, ignore the RenderMaterial associated with surfaces.

nonLocatable
Boolean

If true, the associated Feature will not be drawn when using Viewport.readPixels.

emphasized
Boolean

If true, the associated Feature will be emphasized. Emphasized features are rendered using the Hilite.Settings defined by Viewport.emphasisSettings

modelId
String

The Id of the model whose appearance is to be overridden.

ViewFlagOverrides

TableSchema
Name
Type
Description
renderMode
String

The basic rendering mode applied to the view. This modulates the behavior of some of the other flags.

dimensions
Boolean

Whether to display geometry of class GeometryClass.Dimension.

patterns
Boolean

Whether to display geometry of class GeometryClass.Pattern.

weights
Boolean

Whether to allow lines and edges to draw with width greater than one pixel.

styles
Boolean

Whether LinePixels are allowed to apply patterns to lines and edges. If false, they all draw as solid lines.

transparency
Boolean

Whether element transparency is applied. If false, transparent geometry is drawn opaque.

fill
Boolean

In RenderMode.Wireframe only, whether to display the interiors of planar regions with FillFlags.ByView.

textures
Boolean

In RenderMode.SmoothShade, whether to apply RenderTextures to surfaces.

materials
Boolean

In RenderMode.SmoothShade, whether to apply RenderMaterial]s to surfaces.

acsTriad
Boolean

Whether to display a graphical representation of the view's AuxCoordSystem.

grid
Boolean

Whether to display a grid.

visibleEdges
Boolean

In RenderMode.SmoothShade, whether to display the edges of surfaces.

hiddenEdges
Boolean

In any mode except RenderMode.Wireframe, whether to display the edges of surfaces occluded by other geometry. This has no effect unless visibleEdges is also true.

shadows
Boolean

In RenderMode.SmoothShade, whether to display solar shadows. This has no effect unless lighting is also true.

clipVolume
Boolean

Whether to apply the view's clip volume to the geometry in the scene.

constructions
Boolean

Whether to display geometry of class GeometryClass.Construction.

monochrome
Boolean

Whether to produce a monochrome image.

backgroundMap
Boolean

Whether to display background map imagery.

ambientOcclusion
Boolean

In RenderMode.SmoothShade, whether to apply AmbientOcclusion.

wiremesh
Boolean

If true, overlay surfaces with wiremesh to reveal their triangulation.

lighting
Boolean

In RenderMode.SmoothShade, whether to apply lighting to surfaces.

HiddenLineStyleProps

TableSchema
Name
Type
Description
overrideColor
Boolean

If true, color is overridden.

pattern
String

If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern.

width
Number

If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width. Should be an integer between [1,32]

HiddenLineSettingsProps

TableSchema
Name
Type
Description
transparencyThreshold
Number

A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn. A value of 0.0 indicates any surface that is not 100% opaque should not be drawn. A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn. A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.

CutStyleProps

TableSchema
Name
Type
Description

ClipIntersectionStyleProps

TableSchema
Name
Type
Description
color

Color to apply to intersection of geometry and clip planes, default white.

width
Number

Number of pixels to be considered intersecting the clip plane, default 1.

ClipStyleProps

TableSchema
Name
Type
Description
produceCutGeometry
Boolean

If true, geometry will be produced at the clip planes in a 3d view. - Solids (closed volumes) will produce facets on the clip planes. - Other surfaces will produce line strings representing the edges of the surface at the clip planes.

cutStyle

Controls aspects of how the cut geometry is displayed, if produceCutGeometry is true.

insideColor

If defined, geometry inside the clip planes will be drawn in this color.

outsideColor

If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped.

colorizeIntersection
Boolean

If 'true', intersection of geometry and clip planes will be colorized.

intersectionStyle

Controls the style of the intersection of geometry and clip planes.

DisplayStylePlanarClipMaskProps

TableSchema
Name
Type
Description
mode
String

Controls how the mask geometry is collected.

modelIds
String

Compressed Id set containing the model Ids.

subCategoryOrElementIds
String

Compressed Id set containing the sub category or element Ids.

priority
String

The priority of the planar clip mask.

transparency
Number

The transparency of the planar clip mask. Between 0 (complete masking) and 1 (no masking).

invert
Boolean

A value of true indicates that the mask should be inverted and only content within the mask should be displayed.

modelId
String

The Id of the model to mask.

GroundPlaneProps

TableSchema
Name
Type
Description
display
Boolean

Whether the ground plane should be displayed.

elevation
Number

The Z height at which to draw the ground plane.

aboveColor
belowColor

SkyCubeProps

TableSchema
Name
Type
Description
front
String

JSON representation of the front image used by a SkyCube. Can be an image URL or the Id of a texture element.

back
String

JSON representation of the back image used by a SkyCube. Can be an image URL or the Id of a texture element.

top
String

JSON representation of the top image used by a SkyCube. Can be an image URL or the Id of a texture element.

bottom
String

JSON representation of the bottom image used by a SkyCube. Can be an image URL or the Id of a texture element.

right
String

JSON representation of the right image used by a SkyCube. Can be an image URL or the Id of a texture element.

left
String

JSON representation of the left image used by a SkyCube. Can be an image URL or the Id of a texture element.

SkyBoxImageProps

TableSchema
Name
Type
Description
type
String

Type of skybox image.

texture
String

The image to map to the interior of the sphere.

textures

SkyBoxProps

TableSchema
Name
Type
Description
display
Boolean

Whether or not the skybox should be displayed

twoColor
Boolean

For a SkyGradient, if true, a 2-color gradient skybox is used instead of a 4-color.

groundColor
zenithColor
nadirColor
skyExponent
Number

For a 4-color SkyGradient, controls speed of change from sky color to zenith color; otherwise unused.

groundExponent
Number

For a 4-color SkyGradient, controls speed of change from ground color to nadir color; otherwise unused.

EnvironmentProps

TableSchema
Name
Type
Description

AmbientOcclusionProps

TableSchema
Name
Type
Description
bias
Number

If defined, represents an angle in degrees. If the dot product between the normal of the sample and the vector to the camera is less than this value, sampling stops in the current direction. This is used to remove shadows from near planar edges.

zLengthCap
Number

If defined, if the distance in linear depth from the current sample to first sample is greater than this value, sampling stops in the current direction. The full range of linear depth is 0 to 1.

maxDistance
Number

If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied.

intensity
Number

If defined, raise the final ambient occlusion to the power of this value. Larger values make the ambient shadows darker.

texelStepSize
Number

If defined, indicates the distance to step toward the next texel sample in the current direction.

blurDelta
Number

If defined, blurDelta is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)).

blurSigma
Number

If defined, blurSigma is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)).

blurTexelStepSize
Number

If defined, blurTexelStepSize indicates the distance to the next texel for blurring.

SolarShadowSettingsProps

TableSchema
Name
Type
Description

PortraitProps

TableSchema
Name
Type
Description
intensity
Number

Intensity of the portrait light.

SolarLightProps

TableSchema
Name
Type
Description
intensity
Number

Intensity of the light.

direction
Number[]

Direction of the light in world coordinates.

alwaysEnabled
Boolean

If true, the light will be applied even when shadows are turned off for the view. If false, a roughly overhead light of the same intensity oriented in view space will be used instead.

timePoint
Number

If defined, the time in UNIX milliseconds from which direction was calculated.

HemisphereLightsProps

TableSchema
Name
Type
Description
upperColor
lowerColor
intensity
Number

Intensity of the lights.

AmbientLightProps

TableSchema
Name
Type
Description
intensity
Number

Intensity of the lights.

FresnelSettingsProps

TableSchema
Name
Type
Description
intensity
Number

Intensity of the fresnel.

invert
Number

Whether to inver the fresnel.

LightSettingsProps

TableSchema
Name
Type
Description
specularIntensity
Number

Specular intensity applied to all lights.

numCels
Number

Applies a cel-shaded effect. If greater than zero, specifies the number of cels.

DisplayStyle3dSettingsProps

TableSchema
Name
Type
Description
viewflags
backgroundColor
monochromeColor
monochromeMode
String

The style in which the monochrome color is applied. Can be 1 (Scaled) or 0 (Flat).

renderTimeline
String

The id of a Render Timeline element containing a schedule script that can be used to animate the view.

timePoint
Number

The point in time reflected by the view, in UNIX seconds.

subCategoryOverrides

Overrides applied to the appearances of subcategories in the view.

backgroundMap
contextRealityModels

A list of ContextRealityModels attached to a DisplayStyleSettings.

excludedElements
Object

Ids of elements not to be displayed in the view. It is preferred to use the compressed format, as the number of Ids may be quite large.

mapImagery
modelOverrides

Overrides applied to the appearance of models in the view.

planarClipOverrides

Planar clip masks applied to reality models.

environment
ambientOcclusion
planProjections
Object

Settings controlling how plan projection models are to be rendered. The key for each entry is the Id of the model to which the settings apply.

DisplayStyleSettingsProps

TableSchema
Name
Type
Description
viewflags
backgroundColor
monochromeColor
monochromeMode
String

The style in which the monochrome color is applied. Can be 1 (Scaled) or 0 (Flat).

renderTimeline
String

The id of a Render Timeline element containing a schedule script that can be used to animate the view.

timePoint
Number

The point in time reflected by the view, in UNIX seconds.

subCategoryOverrides

Overrides applied to the appearances of subcategories in the view.

backgroundMap
contextRealityModels

A list of ContextRealityModels attached to a DisplayStyleSettings.

excludedElements
Object

Ids of elements not to be displayed in the view. It is preferred to use the compressed format, as the number of Ids may be quite large.

mapImagery
modelOverrides

Overrides applied to the appearance of models in the view.

planarClipOverrides

Planar clip masks applied to reality models.

ShapeProps

TableSchema
Name
Type
Description
points
Array[]

The points describing the polygon.

transform
Array[]

Transform applied to the polygon.

zLow
Number

Lower bound on Z.

zHigh
Number

Upper bound on Z.

mask
Boolean

true if this shape is a mask.

invisible
Boolean

true if this shape is invisible.

ClipPrimitiveShapeProps

TableSchema
Name
Type
Description

PlanesProps

TableSchema
Name
Type
Description
clips
Array[]
invisible
Boolean

true if the primitive is a hole.

ClipPrimitivePlaneProps

TableSchema
Name
Type
Description

ExtensionLinks

TableSchema
Name
Type
Description
extensions
Object[]

ExtensionPayload

TableSchema
Name
Type
Description
extension.extensionName
String
extension.markdownUrl
String
extension.schemaUrl
String
extension.data
String
extension._links.iTwin.href
String
extension._links.project.href
String
extension._links.imodel.href
String
extension._links.savedView.href
String

SavedViewWithData

TableSchema
Name
Type
Description
id
String

Unique identifier

displayName
String

User visible name

shared
Boolean

Flag for whether or not element is shared

tags

Tags of Saved View

savedViewData

Error

Contains error information.

TableSchema
Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String

The target of the error.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

TableSchema
Name
Type
Description
error

Error information.