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.
POST https://api.bentley.com/imodels/{id}/changesetgroups

Creates a new Changeset Group.

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.

The intended workflow is as follows:

  1. Application creates a Changeset Group.

  2. Application pushes one or more Changesets to that Changeset Group by setting groupId property on the Changeset entity.

  3. Application updates Changeset Group and sets its state value to completed.

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_write permission assigned at the iModel level and at least imodels_webview permission assigned at the iTwin level. If permissions at the iModel level are not configured, then user must have imodels_write 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.

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.

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
In
Required?
Description
id
template
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.

Request body

Changeset Group (create)

Name
Type
Required?
Description
description
String,null
No

Description of the new Changeset Group that will be created. Valid description values are strings that are not longer than 255 characters.

Example

json
{
    "description": "MicroStation Connector run 2024-01-01"
}

Response 201 Created

Created

json
{
    "changesetGroup": {
        "id": "80e7afd9-5df8-4ae0-8810-d1a35069b4a2",
        "state": "inProgress",
        "description": "MicroStation Connector",
        "creatorId": "ea4dfb9f-7f66-4c6f-82c5-0efad1636a1f",
        "createdDateTime": "2024-02-01T11:13:36.6630000Z",
        "_links": {
            "creator": {
                "href": "https://api.bentley.com/imodels/1b68e726-57e0-49b9-8080-7da530c443ce/users/ea4dfb9f-7f66-4c6f-82c5-0efad1636a1f"
            }
        }
    }
}

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 403 Forbidden

User is not authorized to create a Changeset Group.

json
{
    "error": {
        "code": "InsufficientPermissions",
        "message": "The user has insufficient permissions for the requested operation."
    }
}

Response 404 Not Found

Specified iModel was not found.

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

Response 409 Conflict

iModel is not initialized and modify operations are not allowed.

json
{
    "error": {
        "code": "iModelNotInitialized",
        "message": "iModel is not initialized."
    }
}

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 create Changeset Group.",
        "details": [{
                "code": "InvalidValue",
                "message": "Provided 'description' value is not valid. The value exceeds allowed 255 characters.",
                "target": "description"
            },
            {
                "code": "InvalidHeaderValue",
                "message": "'application/xml' is not supported 'content-type'. Supported media type is 'application/json'.",
                "target": "content-type"
            }
        ]
    }
}

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.

TableSchema
Name
Type
Description
href
String

Hyperlink to the specific entity.

Changeset Group (create)

Properties of the Changeset Group to be created.

TableSchema
Name
Type
Description
description
String,null

Description of the new Changeset Group that will be created. Valid description values are strings that are not longer than 255 characters.

Changeset Group Response

Container for Changeset Group object.

TableSchema
Name
Type
Description
changesetGroup

Changeset Group properties.

Changeset Group

TableSchema
Name
Type
Description
id
String

Id of the Changeset Group.

state
String

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
String

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.

TableSchema
Name
Type
Description
creator

Information about the creator of the Changeset Group.

Error

Contains error information.

TableSchema
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

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.

TableSchema
Name
Type
Description
error

Error information.