Table of contents
iTwins
Download API definition:
This operation is a Technical Preview and is available for testing purposes only. Do not use in production.
GET https://dev-api.bentley.com/itwins/{iTwinId}/repositories/{repositoryId}

Gets the details of the specified repository.

The repository will only be returned if it contains at least one resource. Otherwise, it will return 404 (NotFound).

Authentication

Requires Authorization header with valid Bearer token for scope itwin-platform.

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

Authorization

User must be an Organization Administrator for the Organization that owns the specified iTwin Repository or be an iTwin team member.

An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.

Request parameters

Name
Required?
Description
iTwinId
Yes

The iTwin Id

repositoryId
Yes

The repository Id

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Response 200 OK

OK

json
{
    "repository": {
        "id": "e2ecdff7-2802-48bf-9bfa-d418c740c8cd",
        "class": "GeographicInformationSystem",
        "subClass": "UrlTemplate",
        "displayName": "My xyz template server",
        "uri": "http://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",
        "authentication": {
            "type": "Header",
            "key": "X-Api-Key",
            "value": "mySecretApiKey"
        },
        "options": {
            "queryParameters": {
                "apiVersion": "1.5.1"
            },
            "minimumLevel": 10,
            "maximumLevel": 20
        }
    }
}

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

This response indicates that the specified repository was not found.

json
{
    "error": {
        "code": "iTwinRepositoryNotFound",
        "message": "Requested iTwin Repository is not available."
    }
}

Response 429 Too many requests

This response indicates that the client sent more requests than allowed by this API for the current tier of the client.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

iTwin-repository-response

Name
Type
Description

iTwin Repository Class

The class of the iTwin repository.

Name
Type
Description
RealityData
String
iModels
String
Storage
String
Forms
String
Construction
String
GeographicInformationSystem
String
CesiumCuratedContent
String
SensorData
String
Subsurface
String
GeospatialFeatures
String
PdfPlansets
String
IndexedMedia
String

iTwin Repository SubClass

The subclass of the iTwin repository.

Name
Type
Description
WebMapService
String
WebMapTileService
String
ArcGIS
String
UrlTemplate
String
OgcApiFeatures
String
Performance
String
EvoWorkspace
String

iTwin Repository Authentication Type

This value determines how to process the authentication information returned from the API.

Name
Type
Description
Header
String
QueryParameter
String
Basic
String
OAuth2AuthorizationCodePKCE
String

iTwin-repository

Name
Type
Description
id
String

The iTwin repository id.

class

The repository class.

subClass

The repository subclass.

displayName
String

The repository name that can be displayed to the user.

uri
String

The uri for the repository.

capabilities.resources
authentication

Some repositories require authentication. If authentication details are provided, inspect the authentication.type property to determine the required method. You may need to add an Api Key (header or query parameter), use basic authentication, or implement OAuth2 authorization code flow.

options

Additional options that are needed when requesting data from the repository.

GIS-General-Options

Options that may be needed to query or display data from the repository.

Name
Type
Description
queryParameters
Object

Query parameters that should be added to the uri when making a request.

GIS-UrlTemplate-Options

Options that can be used in the construtor of the UrlTemplateImageryProvider. Also includes the general options that allow you to specify query parameters if needed.

Name
Type
Description
queryParameters
Object

Query parameters that should be added to the uri when making a request.

minimumLevel
Integer

Minimum level-of-detail that can be requested.

maximumLevel
Integer

Maximum level-of-detail that can be requested.

ResourcesCapability

Name
Type
Description
uri
String

A uri containing the endpoint that will return the list of resources in the repository.

ApiKey-Authentication

Contains the information needed to authenticate to the specified API using an api key.

Name
Type
Description
key
String

The key to use for Header or QueryParameter auth types.

value
String

The value to use for Header or QueryParameter auth types.

Basic-Authentication

Contains the information needed to authenticate to the specified API using Basic authentication.

Name
Type
Description
username
String

The username to use for Basic auth type.

password
String

The password to use for Basic auth type.

OAuth2AuthCodePKCE-Authentication

Contains the information needed to authenticate to the specified API using OAuth2 authentication.

Name
Type
Description
clientId
String

The OAuth2 client identifier registered with the authorization server.

scopes
String

A space-separated list of permissions (scopes) your app is requesting.

authorizationEndpoint
String

The URL where the user is redirected to start the OAuth2 authorization process.

tokenEndpoint
String

The URL used to exchange the authorization code for access and refresh tokens.

redirectUri
String

The URI where the authorization server will redirect the user after authorization is complete.

Error

Contains error information.

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, null

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.

Name
Type
Description
error

Error information.

Was this page helpful?