Update metadata of the iModel.
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 have imodels_manage
permission assigned at the iModel level. If iModel Role permissions at the iModel level are configured, then user must additionally have at least imodels_webview
permission assigned at the iTwin level. If permissions at the iModel level are not configured, then user must have imodels_manage
permission assigned at the iTwin level.
Alternatively the user should be an Organization Administrator for the Organization that owns a given iTwin the iModel belongs to.
For more information please refer to Account Administrator documentation section on Access Control API documentation page.
Rate limits
All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.
Request parameters
iModel id
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v2+json
is recommended.
Indicates request body content type. Supported media type is application/json
.
Request body
iModel (update)
Name of the iModel.
Description of the iModel.
The maximum rectangular area on the Earth which encloses the iModel. The maximum extent is used to help keep your iModel clean. When new elements are imported, those outside the extent will be flagged for further processing. This extent will also help to zoom to the area of interest in web viewers.
Example
{ "name": "Sun City Renewable-energy Plant", "description": "Overall model of wind and solar farms in Sun City", "extent": { "southWest": { "latitude": 46.13267702834806, "longitude": 7.672120009938448 }, "northEast": { "latitude": 46.302763954781234, "longitude": 7.835541640797823 } } }
Response 200 OK
OK
{ "iModel": { "id": "5e19bee0-3aea-4355-a9f0-c6df9989ee7d", "displayName": "Sun City Renewable-energy Plant", "dataCenterLocation": "East US", "name": "Sun City Renewable-energy Plant", "description": "Overall model of wind and solar farms in Sun City", "state": "initialized", "createdDateTime": "2020-10-20T10:51:33.1700000Z", "iTwinId": "ad0ba809-9241-48ad-9eb0-c8038c1a1d51", "isSecured": false, "extent": { "southWest": { "latitude": 46.13267702834806, "longitude": 7.672120009938448 }, "northEast": { "latitude": 46.302763954781234, "longitude": 7.835541640797823 } }, "_links": { "creator": { "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/users/42101fba-847a-4f4e-85a8-a4bed89065e4" }, "changesets": { "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/changesets" }, "namedVersions": { "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/namedversions" } } } }
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 403 Forbidden
User is not authorized to update an iModel.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
Requested iModel is not available.
{ "error": { "code": "iModelNotFound", "message": "Requested iModel is not available." } }
Response 409 Conflict
iModel with the same name already exists within the iTwin or the iModel is not initialized.
{ "error": { "code": "iModelExists", "message": "iModel with the same name already exists within the iTwin." } }
Response 415 Unsupported Media Type
This response indicates that the user has specified not supported media type in the request.
{ "error": { "code": "UnsupportedMediaType", "message": "Media Type is not supported." } }
Response 422 Unprocessable Entity
The 422 (Unprocessable Entity) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)
{ "error": { "code": "InvalidiModelsRequest", "message": "Cannot update iModel.", "details": [{ "code": "InvalidValue", "message": "Provided 'extent' value is not valid. Valid 'latitude' value range is -90 to 90.", "target": "extent" }, { "code": "MissingRequiredProperty", "message": "Required property is missing. At least one of the following properties must be provided: 'extent', 'name', 'description'." }, { "code": "InvalidRequestBody", "message": "Failed to parse request body. Make sure it is a valid JSON." } ] } }
Response 429 Too many requests
This response indicates that the user has sent too many requests in a given amount of time.
{ "error": { "code": "TooManyRequests", "message": "More requests were received than the subscription rate-limit allows." } }
Response headers
The number of requests exceeds the rate-limit for the client subscription.
iModel Response
Container for iModel object.
iModel state
Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.
iModel
Full representation of the iModel.
Id of the iModel
Display name of the iModel. Corresponds to Name property.
The data center where the data for this iModel is persisted. It will be the same as the iTwin data center, unless that data center is not supported or was not supported when the first iTwin iModel was created. All iTwin iModels are in the same region. Default is East US. Possible Values: Australia East, Canada Central, East US, Japan East, North Europe, South Africa North, Southeast Asia, UK South.
Name of the iModel.
Description of the iModel.
Date when the iModel was created.
Id of the iTwin that iModel belongs to.
Indicates if permissions at the iModel level are configured. true
- iModel level permissions are configured. Permissions at iModel level override the iTwin level permissions. false
- iModel permissions are not configured and the iTwin level permissions are applied.
The maximum rectangular area on the Earth which encloses the iModel. The maximum extent is used to help keep your iModel clean. When new elements are imported, those outside the extent will be flagged for further processing. This extent will also help to zoom to the area of interest in web viewers.
Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.
Technology Preview property. Reserved for internal use only.
iModel (update)
Properties of the iModel to be updated.
Name of the iModel.
Description of the iModel.
The maximum rectangular area on the Earth which encloses the iModel. The maximum extent is used to help keep your iModel clean. When new elements are imported, those outside the extent will be flagged for further processing. This extent will also help to zoom to the area of interest in web viewers.
iModel Links
Hyperlinks to related data which complements this entity.
Link
Hyperlink container.
Hyperlink to the specific entity.
Extent
A rectangular area on the Earth. A rectangular area is defined by two latitudes and two longitudes that represent the four sides of a rectangular area on the Earth.
Point
A point on the Earth specified by a latitude and longitude.
Latitude. Latitude ranges between -90 and 90 degrees, inclusive.
Longitude. Longitude ranges between -180 and 180 degrees, inclusive.
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.
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.