Allows you to modify certain properties of a form definition, such as its display name, status (availability for use), and its ID number prefix that will appear on filled-out instances.
Note: Modifying the layout of the form (the definition
property) is not supported through this endpoint. For that, use the Bentley Form Manager webapp, located at https://connect-formmanager.bentley.com/designer/#/your-itwin-id (replace your-itwin-id
with your actual iTwin ID).
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.
Request parameters
The ID of the form definition to update. This should be an ID retrieved from the "Get iTwin form definitions" endpoint or a form data instance's "formId" property.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
Form Definition Update
A new display name for the form definition.
Sets the form definition's status (usability). Draft
and Maintenance
lets users edit its layout, but not fill out instances of it. Approved
lets users fill it out, but not edit its layout. Archived
allows neither.
Indicates whether the form definition can be shared between iTwins. ReadOnly
or ReadWrite
means it can be used in multiple iTwins. ReadOnly
means its layout can only be edited from its original iTwin, whereas ReadWrite
means it can be edited from anywhere. Once shared, a form definition cannot be unshared or have its shareType changed.
Prefix containing up to 25 characters. This will appear at the start of the auto-incrementing number
string generated for each filled-out instance of this form definition. Can be null in which case the prefix will be automatically determined by the form's type.
Example
{ "displayName": "Safety Checklist EDITED", "status": "Maintenance", "shareType": "ReadOnly", "idPrefix": "EDIT-SCL" }
Response 200 OK
OK
{ "formDefinition": { "id": "e5Ue5Ue5U02hNz19awLcRp7OYlFQQNFNjw123456789", "displayName": "Safety Checklist EDITED", "type": "Other", "status": "Maintenance", "shareType": "ReadWrite", "idPrefix": "EDIT-SCL", "errorStatus": "Warning", "_links": { "design": { "href": "https://connect-formmanager.bentley.com/designer/#/00000000-0000-0000-0000-000000000000/design/11111111-1111-1111-1111-111111111111" } } } }
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 409 Conflict
This response indicates that the specified form definition could not be updated, either because it does not exist (UpsertNotSupported), or because it is not in an editable status and the requested change is not allowed (FormDefIsClosed).
{ "error": { "code": "UpsertNotSupported", "message": "The form definition with the specified ID was not found, and this endpoint does not support creating new instances.", "target": "id" } }
Response 422 Unprocessable Entity
This response indicates that there is a problem with the request body, such as an invalid property value or an unsupported property.
{ "error": { "code": "InvalidFormDefRequest", "message": "Cannot update form definition.", "details": [{ "code": "InvalidValue", "message": "'New' is not a valid form definition status. Valid values are: 'Draft', 'Approved', 'Maintenance', 'Archived'.", "target": "status" }] } }
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.
Form Definition Summary status
Whether this form definition is available for use. Possible values: Draft
or Maintenance
means users can edit its layout, but not fill out instances of it. Approved
means users can fill it out, but not edit its layout. Archived
allows neither.
{ "type": "string", "description": "Whether this form definition is available for use. Possible values: `Draft` or `Maintenance` means users can edit its layout, but not fill out instances of it. `Approved` means users can fill it out, but not edit its layout. `Archived` allows neither.", "enum": [ "Draft", "Approved", "Maintenance", "Archived" ], "title": "Form Definition Summary status" }
Form Definition Summary shareType
Whether this form definition can be used in multiple iTwins. A value of null
means it cannot. 'ReadOnly'
and 'ReadWrite'
mean it can. 'ReadOnly'
means its layout can only be edited from its original iTwin, and 'ReadWrite'
means its layout can be edited from any iTwin in the organization.
{ "type": "string", "description": "Whether this form definition can be used in multiple iTwins. A value of `null` means it cannot. `'ReadOnly'` and `'ReadWrite'` mean it can. `'ReadOnly'` means its layout can only be edited from its original iTwin, and `'ReadWrite'` means its layout can be edited from any iTwin in the organization.", "enum": [ null, "ReadOnly", "ReadWrite" ], "nullable": true, "title": "Form Definition Summary shareType" }
Form Definition Summary errorStatus
String describing whether the form definition has problems that could prevent it from displaying (Warning) or functioning (Error or Critical) correctly. Possible values: 'None', 'Warning', 'Error', 'Critical', 'Unknown'.
{ "type": "string", "description": "String describing whether the form definition has problems that could prevent it from displaying (Warning) or functioning (Error or Critical) correctly. Possible values: 'None', 'Warning', 'Error', 'Critical', 'Unknown'.", "enum": [ "None", "Warning", "Error", "Critical", "Unknown" ], "title": "Form Definition Summary errorStatus" }
Form Definition Summary
Unique ID for this form definition.
The name of this form definition as it is displayed to users in the Form Manager UI and Forms webapp UI.
The form type that can be created from this form definition.
Whether this form definition is available for use. Possible values: Draft
or Maintenance
means users can edit its layout, but not fill out instances of it. Approved
means users can fill it out, but not edit its layout. Archived
allows neither.
Whether this form definition can be used in multiple iTwins. A value of null
means it cannot. 'ReadOnly'
and 'ReadWrite'
mean it can. 'ReadOnly'
means its layout can only be edited from its original iTwin, and 'ReadWrite'
means its layout can be edited from any iTwin in the organization.
A prefix that appears in front of the auto-incrementing number
property of each filled-out instance created from this form definition. Can be null, in which case the system fills in the prefix based on the form's type.
String describing whether the form definition has problems that could prevent it from displaying (Warning) or functioning (Error or Critical) correctly. Possible values: 'None', 'Warning', 'Error', 'Critical', 'Unknown'.
{ "type": "object", "title": "Form Definition Summary", "properties": { "id": { "type": "string", "description": "Unique ID for this form definition." }, "displayName": { "type": "string", "description": "The name of this form definition as it is displayed to users in the Form Manager UI and Forms webapp UI." }, "type": { "type": "string", "description": "The form type that can be created from this form definition." }, "status": { "type": "string", "description": "Whether this form definition is available for use. Possible values: `Draft` or `Maintenance` means users can edit its layout, but not fill out instances of it. `Approved` means users can fill it out, but not edit its layout. `Archived` allows neither.", "enum": [ "Draft", "Approved", "Maintenance", "Archived" ], "title": "Form Definition Summary status", "$ref": "#/components/schemas/form-definition-summary-representation-status" }, "shareType": { "type": "string", "description": "Whether this form definition can be used in multiple iTwins. A value of `null` means it cannot. `'ReadOnly'` and `'ReadWrite'` mean it can. `'ReadOnly'` means its layout can only be edited from its original iTwin, and `'ReadWrite'` means its layout can be edited from any iTwin in the organization.", "enum": [ null, "ReadOnly", "ReadWrite" ], "nullable": true, "title": "Form Definition Summary shareType", "$ref": "#/components/schemas/form-definition-summary-representation-shareType" }, "idPrefix": { "type": "string", "description": "A prefix that appears in front of the auto-incrementing `number` property of each filled-out instance created from this form definition. Can be null, in which case the system fills in the prefix based on the form's type.", "nullable": true }, "errorStatus": { "type": "string", "description": "String describing whether the form definition has problems that could prevent it from displaying (Warning) or functioning (Error or Critical) correctly. Possible values: 'None', 'Warning', 'Error', 'Critical', 'Unknown'.", "enum": [ "None", "Warning", "Error", "Critical", "Unknown" ], "title": "Form Definition Summary errorStatus", "$ref": "#/components/schemas/form-definition-summary-representation-errorStatus" }, "_links": { "$ref": "#/components/schemas/form-definition-design-links" } }, "required": [ "id", "displayName", "type", "status" ], "additionalProperties": false }
form-definition-design-links
If this form definition is in an editable state and you have permission to edit form definitions, this link sends you to the Form Manager webapp where you can edit its layout. Otherwise, this link will not appear.
{ "type": "object", "description": "If this form definition is in an editable state and you have permission to edit form definitions, this link sends you to the Form Manager webapp where you can edit its layout. Otherwise, this link will not appear.", "properties": { "design": { "$ref": "#/components/schemas/link" } }, "additionalProperties": false }
Form Definition Update status
Sets the form definition's status (usability). Draft
and Maintenance
lets users edit its layout, but not fill out instances of it. Approved
lets users fill it out, but not edit its layout. Archived
allows neither.
{ "type": "string", "description": "Sets the form definition's status (usability). `Draft` and `Maintenance` lets users edit its layout, but not fill out instances of it. `Approved` lets users fill it out, but not edit its layout. `Archived` allows neither.", "enum": [ "Draft", "Approved", "Maintenance", "Archived" ], "title": "Form Definition Update status" }
Form Definition Update shareType
Indicates whether the form definition can be shared between iTwins. ReadOnly
or ReadWrite
means it can be used in multiple iTwins. ReadOnly
means its layout can only be edited from its original iTwin, whereas ReadWrite
means it can be edited from anywhere. Once shared, a form definition cannot be unshared or have its shareType changed.
{ "type": "string", "description": "Indicates whether the form definition can be shared between iTwins. `ReadOnly` or `ReadWrite` means it can be used in multiple iTwins. `ReadOnly` means its layout can only be edited from its original iTwin, whereas `ReadWrite` means it can be edited from anywhere. Once shared, a form definition cannot be unshared or have its shareType changed.", "enum": [ null, "ReadOnly", "ReadWrite" ], "nullable": true, "title": "Form Definition Update shareType" }
Form Definition Update
A new display name for the form definition.
Sets the form definition's status (usability). Draft
and Maintenance
lets users edit its layout, but not fill out instances of it. Approved
lets users fill it out, but not edit its layout. Archived
allows neither.
Indicates whether the form definition can be shared between iTwins. ReadOnly
or ReadWrite
means it can be used in multiple iTwins. ReadOnly
means its layout can only be edited from its original iTwin, whereas ReadWrite
means it can be edited from anywhere. Once shared, a form definition cannot be unshared or have its shareType changed.
Prefix containing up to 25 characters. This will appear at the start of the auto-incrementing number
string generated for each filled-out instance of this form definition. Can be null in which case the prefix will be automatically determined by the form's type.
{ "type": "object", "title": "Form Definition Update", "properties": { "displayName": { "type": "string", "description": "A new display name for the form definition." }, "status": { "type": "string", "description": "Sets the form definition's status (usability). `Draft` and `Maintenance` lets users edit its layout, but not fill out instances of it. `Approved` lets users fill it out, but not edit its layout. `Archived` allows neither.", "enum": [ "Draft", "Approved", "Maintenance", "Archived" ], "title": "Form Definition Update status", "$ref": "#/components/schemas/form-definition-update-status" }, "shareType": { "type": "string", "description": "Indicates whether the form definition can be shared between iTwins. `ReadOnly` or `ReadWrite` means it can be used in multiple iTwins. `ReadOnly` means its layout can only be edited from its original iTwin, whereas `ReadWrite` means it can be edited from anywhere. Once shared, a form definition cannot be unshared or have its shareType changed.", "enum": [ null, "ReadOnly", "ReadWrite" ], "nullable": true, "title": "Form Definition Update shareType", "$ref": "#/components/schemas/form-definition-update-shareType" }, "idPrefix": { "type": "string", "description": "Prefix containing up to 25 characters. This will appear at the start of the auto-incrementing `number` string generated for each filled-out instance of this form definition. Can be null in which case the prefix will be automatically determined by the form's type.", "nullable": true } }, "additionalProperties": false }
Form Definition Update Response
{ "type": "object", "title": "Form Definition Update Response", "properties": { "formDefinition": { "$ref": "#/components/schemas/form-definition-summary-representation" } }, "required": [ "formDefinition" ], "additionalProperties": false }
link
{ "type": "object", "properties": { "href": { "type": "string" } }, "additionalProperties": false }
DetailedError
Contains error information and an array of more specific errors.
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 and an array of more specific errors.", "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 }, "details": { "type": "array", "description": "Optional array of more specific errors.", "items": { "$ref": "#/components/schemas/Error" } } }, "required": [ "code", "message", "details" ], "additionalProperties": true }
Detailed 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": "Detailed 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 Detailed information.", "$ref": "#/components/schemas/DetailedError" } }, "required": [ "error" ], "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?