Table of contents
Issues
Download API definition:
GET https://api.bentley.com/issues/formDefinitions?iTwinId[&type][&search][&status]

Retrieves a list of form definitions for the iTwin with the given ID. By default this retrieves only Approved form definitions; set the status parameter to any or another status to override this.

Note that in order to create an issue, it must be associated with the ID of one of these form definitions (through the 'formId' property in the 'Create issue' request body). This API cannot be used to create or edit form definitions. They can only be created/edited/imported by project administrators through the Bentley Form Manager webapp, which is accessible at https://connect-formmanager.bentley.com/designer/#/your-itwin-id (replace your-itwin-id with your actual project or iTwin ID). If you call this endpoint with the Prefer header set to return=representation, then any form definitions in the response that you have permission to edit will include a link you can follow to edit their layout in the Form Manager webapp.

Note that the 'iTwinId' query string parameter is required. It must be a valid iTwin or project GUID to get form definitions from. Older clients can continue to use 'projectId' as an alias for 'iTwinId'.

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
iTwinId
Yes

The GUID of the iTwin or project to get form definitions for. (Note: projectId is also accepted as an alias for this parameter.)

type
No

The issue type to get form definitions for. Omit to get all form definitions, regardless of type.

search
No

If present, filters the results to only include form definitions with the given string (case-insensitive) in their names.

status
No

Filters form definitions by their status (i.e., whether they are ready for use). Options are 'Draft', 'Approved', 'Maintenance', or 'Archived' to only get form definitions with the given status, or 'any' to get form definitions regardless of status. Default is 'Approved'.

Request headers

Name
Required?
Description
Prefer
No

Chooses whether to get a summary of each form definition (return=minimal) or more properties (return=representation)

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
{
    "formDefinitions": [{
            "id": "e5Ue5Ue5U02hNz19awLcRpwxKq9kmcZEqw123456789",
            "displayName": "Clash Review",
            "type": "Clash",
            "status": "Approved"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRnQIKZ9n-5VNql123456789",
            "displayName": "Civil",
            "type": "Civil Design",
            "status": "Approved"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRvZ97C-0gldCg7123456789",
            "displayName": "PWDM RFI",
            "type": "RFI",
            "status": "Draft"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRk1_FOY1fxhOoL123456789",
            "displayName": "Punch List",
            "type": "Closeout",
            "status": "Draft"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRmFoakRibdVAsq123456789",
            "displayName": "Punchlist",
            "type": "Punchlist",
            "status": "Maintenance"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRtnnI7NMyWVCqt123456789",
            "displayName": "Issue",
            "type": "Field Data",
            "status": "Approved"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRs_krW5iPFdMhX123456789",
            "displayName": "Design Issue",
            "type": "Issue",
            "status": "Approved"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRtfgSsUdmQxLkB123456789",
            "displayName": "Design Task",
            "type": "Task",
            "status": "Approved"
        },
        {
            "id": "e5Ue5Ue5U02hNz19awLcRqs7_5zpRFVJpy123456789",
            "displayName": "Design Review",
            "type": "Communication",
            "status": "Archived"
        }
    ]
}

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 project with the specified ID does not exist or is inaccessible to the user due to insufficient permissions. (For security reasons, the response will not differ between inaccessible and missing projects.)

json
{
    "error": {
        "code": "ProjectNotFound",
        "message": "Requested project is not available.",
        "target": "projectId"
    }
}

Response 422 Unprocessable Entity

This response indicates that there is a problem with the format of the URL. Most likely problem: The 'iTwinId' parameter is missing or not a valid GUID.

json
{
    "error": {
        "code": "InvalidFormDefRequest",
        "message": "Cannot retrieve form definitions.",
        "details": [{
            "code": "MissingRequiredParameter",
            "message": "The 'iTwinId' query parameter must be provided.",
            "target": "iTwinId"
        }]
    }
}

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 List

Name
Type
Description

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 issues from it. Approved means users can fill it out, but not edit its layout. Archived allows neither.

Name
Type
Description
Draft
String
Approved
String
Maintenance
String
Archived
String

Form Definition Summary

Name
Type
Description
id
String

Unique ID for this form definition.

displayName
String

The name of this form definition as it is displayed to users in the Form Manager UI and Issues webapp UI.

type
String

The issue type that can be created from this form definition.

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 issues from it. Approved means users can fill it out, but not edit its layout. Archived allows neither.

Form Definition List

Name
Type
Description

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 issues from it. Approved means users can fill it out, but not edit its layout. Archived allows neither.

Name
Type
Description
Draft
String
Approved
String
Maintenance
String
Archived
String

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.

Name
Type
Description
null
String
ReadOnly
String
ReadWrite
String

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'.

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

Form Definition Summary

Name
Type
Description
id
String

Unique ID for this form definition.

displayName
String

The name of this form definition as it is displayed to users in the Form Manager UI and Issues webapp UI.

type
String

The issue type that can be created from this form definition.

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 issues from it. Approved means users can fill it out, but not edit its layout. Archived allows neither.

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.

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 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'.

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

DetailedError

Contains error information and an array of more specific errors.

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.

details

Optional array of more specific errors.

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.

Name
Type
Description
error

Error Detailed information.

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.