Table of contents
iModels
Download API definition:
GET https://api.bentley.com/imodels/{id}/changesetgroups

Retrieves a list of Changeset Groups for the iModel specified by the iModel id.

Changeset Groups are a way to logically group Changesets. Changesets that belong to the same Changeset Group may be interpreted as one logical change to the iModel, for example, iModel synchronization process may create multiple Changesets but they all represent one synchronization run.

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

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
{
    "changesetGroups": [{
            "id": "018b77a5-ed0f-4a74-a88d-13bc221d1a9a",
            "state": "inProgress",
            "description": "Connector run 2024-02-01",
            "creatorId": "42101fba-847a-4f4e-85a8-a4bed89065e4",
            "createdDateTime": "2024-02-01T11:10:12.6230000Z",
            "_links": {
                "creator": {
                    "href": "https://api.bentley.com/imodels/1b68e726-57e0-49b9-8080-7da530c443ce/users/42101fba-847a-4f4e-85a8-a4bed89065e4"
                }
            }
        },
        {
            "id": "1c6f461d-3457-467d-95fe-16d700dabb99",
            "state": "completed",
            "description": "Connector run 2023-11-27",
            "creatorId": "42101fba-847a-4f4e-85a8-a4bed89065e4",
            "createdDateTime": "2023-11-27T09:45:57.6630000Z",
            "_links": {
                "creator": {
                    "href": "https://api.bentley.com/imodels/1b68e726-57e0-49b9-8080-7da530c443ce/users/42101fba-847a-4f4e-85a8-a4bed89065e4"
                }
            }
        }
    ],
    "_links": {
        "self": {
            "href": "https://api.bentley.com/imodels/1b68e726-57e0-49b9-8080-7da530c443ce/changesetgroups?$skip=0&$top=100"
        },
        "prev": null,
        "next": 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 Changeset Groups.",
        "details": [{
            "code": "InvalidValue",
            "message": "'-1' is not a valid '$skip' value. '$skip' must be a non-negative integer.",
            "target": "$skip"
        }]
    }
}

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

Hyperlink container.

Name
Type
Description
href
String

Hyperlink to the specific entity.

Paging Links

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

Name
Type
Description
self

URL for redoing the current request.

prev

URL for getting the previous page of results.

next

URL for getting the next page of results.

Changeset Group List Response

List of Changeset Group entries.

Name
Type
Description
changesetGroups

iModel Changeset Groups.

_links

Contains the hyperlinks to the previous and next pages of results.

Changeset Group state

Indicates the state of the Changeset Group. 'inProgress' - indicates that Changeset Group is in progress and Changesets can be pushed to it. 'completed' - indicates that Changeset Group is closed, Changesets cannot be pushed to it anymore. 'timedOut' - indicates that Changeset Group was not completed within the specified timeout period so it was closed by the service, Changesets cannot be pushed to it anymore. forciblyClosed - indicates that Changeset group was forcibly closed before cloning to the target iModel.

Name
Type
Description
inProgress
String
completed
String
timedOut
String
forciblyClosed
String

Changeset Group

Name
Type
Description
id
String

Id of the Changeset Group.

Changeset Group state

Indicates the state of the Changeset Group. 'inProgress' - indicates that Changeset Group is in progress and Changesets can be pushed to it. 'completed' - indicates that Changeset Group is closed, Changesets cannot be pushed to it anymore. 'timedOut' - indicates that Changeset Group was not completed within the specified timeout period so it was closed by the service, Changesets cannot be pushed to it anymore. forciblyClosed - indicates that Changeset group was forcibly closed before cloning to the target iModel.

description
String, null

Description of the Changeset Group.

creatorId
String

Id of the user who created the Changeset Group.

createdDateTime
Date-time

Date when the Changeset Group was created.

_links

Contains the hyperlinks to the related data of the Changeset Group.

Changeset Group Links

Hyperlinks to Changeset Group related data.

Name
Type
Description
creator

Information about the creator of the Changeset Group.

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.