Closes an existing Changeset Group.
Please refer to Create iModel Changeset Group operation documentation for information about the purpose of Changeset Groups.
Closing a Changeset Group means that there will be no more Changesets in the logical group, for example, synchronization process has processed all iModel changes and will not push any more Changesets. If a Changeset Group is closed, meaning its state
property value is completed
, timedOut
or forciblyClosed
, no more Changesets referencing that particular Group will be accepted. Users can only close the Changeset Group by setting completed
state value as other values are set by iModels API.
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. 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_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.
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
Changeset Group id
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v2+json
is recommended.
Request body
Changeset Group (update)
Indicates the state of the Changeset Group. Should be set to 'completed'.
Example
{ "state": "completed" }
Response 200 OK
OK
{ "changesetGroup": { "id": "80e7afd9-5df8-4ae0-8810-d1a35069b4a2", "state": "completed", "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.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
User is not authorized to update a Changeset Group.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
Specified iModel or Changeset Group was not found.
{ "error": { "code": "iModelNotFound", "message": "Requested iModel is not available." } }
Response 409 Conflict
Changeset Group is already closed or the iModel is not initialized.
{ "error": { "code": "ChangesetGroupIsClosed", "message": "Requested Changeset Group is closed." } }
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 Changeset Group.", "details": [{ "code": "InvalidValue", "message": "'abc' is not a valid 'state' value. Valid 'state' values are: 'completed'.", "target": "state" }, { "code": "MissingRequiredProperty", "message": "Required property is missing.", "target": "state" }, { "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 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.
Link
Hyperlink container.
Hyperlink to the specific entity.
{ "type": "object", "nullable": true, "description": "Hyperlink container.", "properties": { "href": { "type": "string", "description": "Hyperlink to the specific entity." } }, "additionalProperties": false }
Changeset Group Response
Container for Changeset Group object.
{ "type": "object", "title": "Changeset Group Response", "description": "Container for Changeset Group object.", "properties": { "changesetGroup": { "$ref": "#/components/schemas/ChangesetGroup", "description": "Changeset Group properties." } }, "additionalProperties": false }
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.
{ "type": "string", "description": "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.", "enum": [ "inProgress", "completed", "timedOut", "forciblyClosed" ], "title": "Changeset Group state" }
Changeset Group
Id of the Changeset Group.
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 of the Changeset Group.
Id of the user who created the Changeset Group.
Date when the Changeset Group was created.
{ "type": "object", "title": "Changeset Group", "properties": { "id": { "type": "string", "description": "Id of the Changeset Group." }, "state": { "type": "string", "description": "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.", "enum": [ "inProgress", "completed", "timedOut", "forciblyClosed" ], "title": "Changeset Group state", "$ref": "#/components/schemas/ChangesetGroup-state" }, "description": { "type": "string", "description": "Description of the Changeset Group.", "nullable": true }, "creatorId": { "type": "string", "description": "Id of the user who created the Changeset Group." }, "createdDateTime": { "type": "string", "format": "date-time", "description": "Date when the Changeset Group was created." }, "_links": { "$ref": "#/components/schemas/ChangesetGroupLinks", "description": "Contains the hyperlinks to the related data of the Changeset Group." } }, "additionalProperties": false }
Changeset Group Links
Hyperlinks to Changeset Group related data.
{ "type": "object", "title": "Changeset Group Links", "description": "Hyperlinks to Changeset Group related data.", "properties": { "creator": { "$ref": "#/components/schemas/Link", "description": "Information about the creator of the Changeset Group." } }, "additionalProperties": false }
Changeset Group (update) state
Indicates the state of the Changeset Group. Should be set to 'completed'.
{ "type": "string", "description": "Indicates the state of the Changeset Group. Should be set to 'completed'.", "enum": [ "inProgress", "completed", "timedOut", "forciblyClosed" ], "title": "Changeset Group (update) state" }
Changeset Group (update)
Properties of the Changeset Group to be updated.
Indicates the state of the Changeset Group. Should be set to 'completed'.
{ "type": "object", "title": "Changeset Group (update)", "description": "Properties of the Changeset Group to be updated.", "properties": { "state": { "type": "string", "description": "Indicates the state of the Changeset Group. Should be set to 'completed'.", "enum": [ "inProgress", "completed", "timedOut", "forciblyClosed" ], "title": "Changeset Group (update) state", "$ref": "#/components/schemas/ChangesetGroupUpdate-state" } }, "required": [ "state" ], "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?