Table of contents
Issues
Download API definition:
GET https://api.bentley.com/issues/formDefinitions/{id}

Gets the full form definition with the specified ID.

If you have permission to edit this form definition, then the response will also include a link you can follow in your browser to edit its layout in the Form Manager webapp.

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

Name
Required?
Description
id
Yes

The ID of the form definition to get. This should be an ID retrieved from the "Get project form definitions" endpoint or an issue's "formId" property.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Response 200 OK

OK

json
{
    "formDefinition": {
        "id": "e5Ue5Ue5U02hNz19awLcRgpmdo8phxZEhB123456789",
        "displayName": "Sample Form",
        "type": "Punchlist",
        "status": "Approved",
        "errorStatus": "None",
        "shareType": "ReadOnly",
        "idPrefix": "SF",
        "definition": "{\"Form\":{\"Width\":520,\"Height\":750,\"Controls\":[{\"Panel\":{\"ElementId\":\"f8b4b07c700247ee8e7be81ca9ef6528\",\"Name\":\"Canvas\",\"DisplayLabel\":\"Canvas\",\"Type\":\"Panel\",\"IsPercent\":false,\"Height\":0,\"MaxHeight\":0,\"Width\":0,\"Binding\":\"\",\"TopPosition\":0,\"LeftPosition\":0,\"IsReadOnly\":false,\"IsRequired\":false,\"StyleGroup\":\"\",\"IsCollapsible\":false,\"IsCollapsed\":false,\"ShowWindSpeed\":false,\"LayoutType\":1,\"ContentSpacing\":16,\"ContentPadding\":8,\"Children\":[{\"TextBox\":{\"ElementId\":\"c274e01b58ae4e94884f91238f65f582\",\"Name\":\"Textbox#7cf1d\",\"DisplayLabel\":\"\",\"Type\":\"TextBox\",\"FileId\":1,\"IsPercent\":true,\"Height\":38,\"MaxHeight\":0,\"Width\":50,\"Binding\":\"_Description\",\"TopPosition\":111,\"LeftPosition\":17,\"IsReadOnly\":false,\"IsRequired\":false,\"StyleGroup\":\"\",\"IsCollapsible\":false,\"IsCollapsed\":false,\"ShowWindSpeed\":false,\"IsSingleLine\":true}}]}}],\"StyleGroups\":[],\"DataBindings\":[{\"DataBinding\":{\"Binding\":\"_Description\",\"ElementId\":\"c274e01b58ae4e94884f91238f65f582\",\"Type\":\"string\",\"DisplayLabel\":\"Description\"}}],\"RelatedObjects\":[{\"RelatedObject\":{\"Type\":\"DynamicSchema:Punchlist\"}}],\"GpsBindingType\":\"storeAsLatLong\",\"GpsFirstBinding\":\"Latitude\",\"GpsSecondBinding\":\"Longitude\"}}",
        "_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.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 404 Not Found

This response indicates that the form definition with the specified ID does not exist or is inaccessible to the user.

json
{
    "error": {
        "code": "FormDefNotFound",
        "message": "Requested form definition is not available.",
        "target": "id"
    }
}

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.

Form Definition Details Response

Name
Type
Description

Form Definition Details status

The form definition's availability. This can be set by a project administrator. Only form definitions set to Approved can be used to create issues. Possible values: 'Draft', 'Approved', 'Archived', 'Maintenance'.

Name
Type
Description
Draft
String
Approved
String
Archived
String
Maintenance
String

Form Definition Details 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'.

Name
Type
Description
None
String
Warning
String
Error
String
Critical
String
Unknown
String

Form Definition Details 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.

Name
Type
Description
null
String
ReadOnly
String
ReadWrite
String

Form Definition Details

Name
Type
Description
id
String

Unique identifier for this form definition. Can be set as the formId property in the 'Create issue' request body.

displayName
String, null

The name of this form definition as it should be displayed to users if they are choosing which form definition to use for a new issue.

type
String

Determines which issue type will be created when this form definition is used.

definition
String

A JSON string defining this form's layout, including all of its controls and their bindings, locations, and styles. As of now third-party applications are not expected to use this property. An automated custom form renderer that works with this REST API is reserved for future development.

Form Definition Details status

The form definition's availability. This can be set by a project administrator. Only form definitions set to Approved can be used to create issues. Possible values: 'Draft', 'Approved', 'Archived', 'Maintenance'.

Form Definition Details 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'.

Form Definition Details 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.

idPrefix
String, null

A prefix that appears in front of the auto-incrementing number property of each filled-out issue created from this form definition. Can be null, in which case the system fills in the prefix based on the issue type.

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.

Name
Type
Description
design

link

Name
Type
Description
href
String

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.