Gets the details of the specified repository.
A repository is a Uri link to iTwin data managed by another service.
For example, if an iTwin has Forms data then you can get the Uri for that data by using this api and specifying iTwinId = 547d397a-9921-4e4f-a7a2-c47fc19219b0 and Class = Forms. It will return the following.
{
"repositories": [
{
"id": "547d397a-9921-4e4f-a7a2-c47fc19219b0",
"class": "Forms",
"subClass": null,
"uri": "https://api.bentley.com/forms?projectId=547d397a-9921-4e4f-a7a2-c47fc19219b0"
}]
}
If no Class is specified then all repositories containing data for the iTwin will be returned. The Uri is automatically generated by calling each service to determine if its repository contains data for the specified iTwin. For example, if there are no iModels for the specified iTwin then the iModel Repository Uri will not be returned.
The following Classes/SubClasses are supported. Classes in italics are auto generated. The others can be added manually using the POST endpoint.
- iModels
- RealityData
- Storage
- Forms
- Issues
- SensorData
- GeographicInformationSystem
- WebMapService
- WebMapTileService
- MapServer
- Construction
- Performance
- Subsurface
- EvoWorkspace
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
The iTwin Id
Specify a particular class that you wish to query on.
Specify a particular subClass that you wish to query on (NOTE: Only the 'GeographicInformationSystem' class can have a subClass).
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Response 200 OK
OK
{ "repositories": [{ "id": "5ebf5b78-a4e4-4bfe-8b1d-838f2c419259", "class": "Construction", "subClass": "Performance", "uri": "https://developer.bentley.com" }, { "id": "6cbfd529-bb6d-4438-9209-09501f214502", "class": "GeographicInformationSystem", "subClass": "WebMapTileService", "uri": "https://developer.bentley.com" } ] }
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.
{ "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.
{ "error": { "code": "iTwinNotFound", "message": "Requested iTwin is not available." } }
Response 422 Unprocessable Entity
Invalid request to get Repositories
{ "error": { "code": "InvalidiTwinsRequest", "message": "Cannot query iTwin Repositories.", "details": [{ "code": "InvalidValue", "message": "A valid iTwin Repository Class was not specified in the query.", "target": "class" }, { "code": "InvalidValue", "message": "A valid iTwin Repository SubClass was not specified in the query.", "target": "subClass" }, { "code": "InvalidValue", "message": "iTwinId contains an invalid value.", "target": "iTwinId" } ] } }
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.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
iTwin-repositories-response
{ "type": "object", "properties": { "repositories": { "type": "array", "items": { "$ref": "#/components/schemas/iTwin-repository" } } }, "required": [ "repositories" ], "additionalProperties": false }
iTwin Repository Class
The class of your iTwin repository.
{ "type": "string", "title": "iTwin Repository Class", "description": "The class of your iTwin repository.", "enum": [ "RealityData", "iModels", "Storage", "Forms", "Issues", "Construction", "GeographicInformationSystem", "CesiumCuratedContent", "SensorData", "Subsurface" ] }
iTwin Repository SubClass
The subclass of your iTwin repository.
{ "type": "string", "title": "iTwin Repository SubClass", "description": "The subclass of your iTwin repository.", "enum": [ "WebMapService", "WebMapTileService", "MapServer", "Performance", "EvoWorkspace" ] }
iTwin-repository
The iTwin repository id.
The uri to the repository.
{ "type": "object", "properties": { "id": { "type": "string", "description": "The iTwin repository id." }, "class": { "$ref": "#/components/schemas/iTwinRepositoryClass" }, "subClass": { "$ref": "#/components/schemas/iTwinRepositorySubClass" }, "uri": { "type": "string", "description": "The uri to the repository." } }, "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
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.
{ "type": "object", "title": "Error Response", "description": "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.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?