Forms
Download API definition:
get https://dev-api.bentley.com/forms/itwins/{iTwinId}/list-groups[?search]

Retrieves the list of list groups in the chosen iTwin. List groups govern the options that appear for the user to select in cascading list controls. These are a series of dropdown list controls in a form definition where the options available in each control beyond the first vary depending on which options were selected in the preceding controls.

By default, this endpoint gets all list groups in the iTwin. If search is specified, only list groups whose names include the given search string (case-insensitive) will be returned.

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 ID of the iTwin to get list groups for.

search
No

If specified, only list groups whose display names contain the given string will be returned in the results.

Request headers

Name
Required?
Description
Prefer
No

Indicates a level of details in the response.

Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Response 200 OK

OK

json
{
    "listGroups": [{
        "id": "876f3da1-ae96-4ab5-84b4-9fa059b6e2d4",
        "displayName": "Sample AB",
        "createdDateTime": "2024-08-21T15:44:09.0000000+00:00",
        "lists": ["Letter", "Number"]
    }, {
        "id": "c2b67110-f1f1-4c72-9d89-18a5d666dcd8",
        "displayName": "Football Teams",
        "createdDateTime": "2024-07-25T21:18:09.0000000+00:00",
        "lists": ["Conference", "Division", "Team"]
    }]
}

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 iTwin 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": "iTwinNotFound",
        "message": "Requested iTwin is not available.",
        "target": "iTwinId"
    }
}

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.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

target
String, null

The target of the error.

message
String

A human-readable representation of the error.

Options Tree

A tree of nested options objects where a key at depth n represents a valid option in the nth dropdown list when the keys above it are selected in the prior lists. For example, if optionsTree.foo.bar.baz is not null or undefined, then baz is a valid option in the third list if foo and bar are selected in the first and second lists, respectively. Keys for the final list will have values equal to empty objects.

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.

List Group Summary

Name
Type
Description
id
String

The unique ID of this list group.

lists
String[], null

The names of the lists defined by this list group, from outermost (first) to innermost (last).

displayName
String

The name of this list group, as entered by its creator.

optionsTree
createdDateTime
Date-time, null

The date and time (UTC) when this list group's file was uploaded.

List Group Summary

Name
Type
Description
id
String

The unique ID of this list group.

lists
String[], null

The names of the lists defined by this list group, from outermost (first) to innermost (last).

displayName
String

The name of this list group, as entered by its creator.

createdDateTime
Date-time, null

The date and time (UTC) when this list group's file was uploaded.

List Groups Minimal Response

Name
Type
Description
listGroups

List Groups Representation Response

Name
Type
Description
listGroups

Was this page helpful?