Uploads a file to set or replace the tree of list options for a specific list group. List groups determine the options that appear in cascading list controls. Cascading list controls are dropdown lists where the available values in one list depend on the values chosen for the previous lists. A form definition's cascading list controls can reference a list group by its ID.
The file uploaded through this endpoint must be an Excel spreadsheet file (.xlsx). The first row of the file must be a header containing the names of the lists (one per column). Subsequent rows represent valid combinations of options, going from the first list to the last. Example:
In this example, the first dropdown list control of the cascading list group would have two options for the user to choose from: "A" and "B". If neither is selected, the second list is disabled. If "A" is selected, then "1" and "2" become available for selection in the second list. Conversely, if "B" is selected, then instead "3" and "4" become available for selection in the second list.
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 iTwin that this list group being updated belongs to.
The ID of the list group to update.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Response 200 OK
Indicates that the list group file was successfully uploaded. Returns the current contents of the list group.
{ "listGroup": { "id": "876f3da1-ae96-4ab5-84b4-9fa059b6e2d4", "displayName": "Sample AB", "createdDateTime": "2024-08-21T15:44:09Z", "lists": [ "Letter", "Number" ], "optionsTree": { "A": { "1": {}, "2": {} }, "B": { "3": {}, "4": {} } } } }
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 404 Not Found
This response indicates that the specified list group or iTwin containing it does not exist or is inaccessible to the user.
{ "error": { "code": "ListGroupNotFound", "message": "Requested list group is not available.", "target": "id" } }
Response 422 Unprocessable Entity
Indicates that there is a problem with the request. Most likely issue: The file is not an Excel spreadsheet (.xlsx) file, or is missing a header in a column.
{ "error": { "code": "InvalidListGroupRequest", "message": "Cannot upload list group file.", "details": [{ "code": "InvalidRequestBody", "message": "Input file must be a valid .xlsx (Excel spreadsheet) file." }] } }
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.
List Group Details Response
{ "type": "object", "title": "List Group Details Response", "properties": { "listGroup": { "$ref": "#/components/schemas/list-group-details" } }, "required": [ "listGroup" ], "additionalProperties": false }
List Group Summary
The unique ID of this list group.
The name of this list group, as entered by its creator.
The date and time (UTC) when this list group's file was uploaded.
The names of the lists defined by this list group, from outermost (first) to innermost (last).
A recursive data structure defining the options available in these lists. Its properties can have any name. For each property in the outermost object, its key should be used as the name of an option in the first list, and its value is an object whose keys correspond to the options that become available in the second list when that particular first-list option is chosen, and so forth. This pattern continues down to the last list, whose options will be represented by properties with empty object values.
{ "type": "object", "title": "List Group Summary", "properties": { "id": { "type": "string", "description": "The unique ID of this list group." }, "displayName": { "type": "string", "description": "The name of this list group, as entered by its creator." }, "createdDateTime": { "type": "string", "format": "date-time", "description": "The date and time (UTC) when this list group's file was uploaded.", "nullable": true }, "lists": { "type": "array", "description": "The names of the lists defined by this list group, from outermost (first) to innermost (last).", "items": { "type": "string" }, "nullable": true }, "optionsTree": { "$ref": "#/components/schemas/dynamic-object", "description": "A recursive data structure defining the options available in these lists. Its properties can have any name. For each property in the outermost object, its key should be used as the name of an option in the first list, and its value is an object whose keys correspond to the options that become available in the second list when that particular first-list option is chosen, and so forth. This pattern continues down to the last list, whose options will be represented by properties with empty object values." } }, "required": [ "id", "displayName" ], "additionalProperties": false }
Dynamic Object
An object whose properties can vary depending on user customization within the project.
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?