Gets the models and categories for the named version of an iModel. This request relies on a previous call to start the extraction job on an agent. Since this extraction completes asynchronously, the user can send this request periodically until a status of 'available' is returned in the response.
-
Discover iModel ids by calling GET /imodels
-
Extract iModel models and categories by calling POST /clashdetection/modelsAndCategories/imodels
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
iModel id
The id of the project containing the iModel from which to retrieve the models and categories.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Response 200 OK
OK
{ "status": "available", "models": [{ "id": "0x21", "displayName": "Physical Office Building" }, { "id": "0x66", "displayName": "Architecture.dgn.i.dgn Architecture" }, { "id": "0x68", "displayName": "Civil.dgn.i.dgn Civil" }, { "id": "0x6a", "displayName": "MEP.dgn.i.dgn MEP" }, { "id": "0x6c", "displayName": "Structural.dgn.i.dgn Structural" } ], "categories": [{ "id": "0x1c", "displayName": "Uncategorized" }, { "id": "0x2b", "displayName": "A-WALL" }, { "id": "0x2d", "displayName": "A-FLOR-HRAL" }, { "id": "0x2f", "displayName": "A-GLAZ" }, { "id": "0x31", "displayName": "A-DOOR" } ] }
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 iModel or project was not found.
{ "error": { "code": "iModelNotFound", "message": "Requested iModel is not available." } }
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.
Models And Categories status
The status of the models and categories extraction. One of 'available', 'unavailable'
{ "type": "string", "description": "The status of the models and categories extraction. One of 'available', 'unavailable'", "enum": [ "available", "unavailable" ], "title": "Models And Categories status" }
Models And Categories
The status of the models and categories extraction. One of 'available', 'unavailable'
{ "title": "Models And Categories", "type": "object", "properties": { "status": { "type": "string", "description": "The status of the models and categories extraction. One of 'available', 'unavailable'", "enum": [ "available", "unavailable" ], "title": "Models And Categories status", "$ref": "#/components/schemas/models-and-categories-status" }, "models": { "type": "array", "description": "Array of all the models in the iModel.", "items": { "$ref": "#/components/schemas/Model" } }, "categories": { "type": "array", "description": "Array of all the categories in the iModel.", "items": { "$ref": "#/components/schemas/Category" } } } }
Model
Model properties
The model id.
The name of the model.
{ "type": "object", "description": "Model properties", "properties": { "id": { "type": "string", "description": "The model id." }, "displayName": { "type": "string", "description": "The name of the model." } } }
Category
Category properties
The clash detection run id.
The name of the category.
{ "type": "object", "description": "Category properties", "properties": { "id": { "type": "string", "description": "The clash detection run id." }, "displayName": { "type": "string", "description": "The name of the category." } } }
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" ] }
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" ] }
Was this page helpful?