Table of contents
iModels
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/imodels/{id}/locks/released-locks?afterChangesetIndex[&$top][&$continuationToken][&$skip]

This is a Technology Preview operation. It is subject to change or removal without notice as part of our innovation process.

Returns locks released in changesets strictly after the specified changeset index. Only fully released locks are returned — objects that were demoted from exclusive to shared are not included.

Note: Page size refers to the total size of returned objectIds throughout all returned instances. If several Released Lock instances are returned that does not necessarily mean that each instance is complete and more objectIds might be returned for that specific instance in a different page.

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_webview 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_webview 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

Name
Required?
Description
id
Yes

iModel id

afterChangesetIndex
Yes

Returns locks released in changesets strictly after the specified changeset index. Value must be a non-negative integer.

$top
No

The $top query option requests the number of items in the queried collection to be included in the result. E.g. to return only first collection item provide the following query: $top=1. When $top parameter is not provided default is set to 100. $top value cannot exceed 1000.

$continuationToken
No

Token to retrieve next page in paginated response. Generated by the service and must be sent as is. Currently $skip parameter is being used by default. To initialize usage of continuation token empty $continuationToken must be provided with the first page query: $continuationToken=. $continuationToken is mutual exclusive with $skip parameter.

$skip
No

Deprecated The $skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. E.g. to return items from the collection starting at the third place provide the following query: $skip=2. $skip is mutual exclusive with $continuationToken parameter.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Response 200 OK

OK

json
{
    "releasedLocks": [{
        "lockLevel": "exclusive",
        "objectIds": ["0x1", "0x2", "0xab"]
    }, {
        "lockLevel": "shared",
        "objectIds": ["0x3", "0x4"]
    }],
    "_links": {
        "self": {
            "href": "https://api.bentley.com/imodels/a6abccea-9e69-4654-8068-33d62daec8ec/locks/released-locks?afterChangesetIndex=0&$skip=0&$top=100"
        },
        "next": {
            "href": null
        },
        "prev": {
            "href": null
        }
    }
}

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

Specified iModel was not found.

json
{
    "error": {
        "code": "iModelNotFound",
        "message": "Requested iModel is not available."
    }
}

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)

json
{
    "error": {
        "code": "InvalidiModelsRequest",
        "message": "Cannot get Locks.",
        "details": [{
            "code": "MissingRequiredParameter",
            "message": "Required parameter is missing.",
            "target": "afterChangesetIndex"
        }]
    }
}

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.

Link

Hyperlink container.

Name
Type
Description
href
String

Hyperlink to the specific entity.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

target
String, null

The target of the error.

message
String

A human-readable representation of the error.

Paging Links

URLs for redoing the current request, getting to the previous or next page of results, if applicable.

Name
Type
Description
next
prev
self

Released Lock lockLevel

The lock level of the released objects.

Name
Type
Description
shared
String
exclusive
String

Released Lock

Contains a list of object ids released at a given lock level.

Name
Type
Description
Released Lock lockLevel

The lock level of the released objects.

objectIds
String[]

List of released object ids.

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.

Released Locks Response

List of Released Locks.

Name
Type
Description
releasedLocks

List of released locks grouped by lock level.

Was this page helpful?