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.
{ "$ref": "#/components/examples/401.HeaderNotFound.example" }
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 client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
Error
Contains error information.
One of a server-defined set of error codes.
The target of the error.
A human-readable representation of the error.
{ "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "target": { "type": "string", "nullable": true, "description": "The target of the error." }, "message": { "type": "string", "description": "A human-readable representation of the error." } }, "description": "Contains error information.", "additionalProperties": true }
Model
Model properties
The model id.
The name of the model.
{ "type": "object", "properties": { "id": { "type": "string", "description": "The model id." }, "displayName": { "type": "string", "description": "The name of the model." } }, "description": "Model properties" }
Category
Category properties
The clash detection run id.
The name of the category.
{ "type": "object", "properties": { "id": { "type": "string", "description": "The clash detection run id." }, "displayName": { "type": "string", "description": "The name of the category." } }, "description": "Category properties" }
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", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/Error", "description": "Error information." } }, "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.", "additionalProperties": false }
Models And Categories status
The status of the models and categories extraction. One of 'available', 'unavailable'
{ "enum": [ "available", "unavailable" ], "type": "string", "description": "The status of the models and categories extraction. One of 'available', 'unavailable'", "title": "Models And Categories status" }
Models And Categories
The status of the models and categories extraction. One of 'available', 'unavailable'
{ "type": "object", "title": "Models And Categories", "properties": { "models": { "type": "array", "items": { "$ref": "#/components/schemas/Model" }, "description": "Array of all the models in the iModel." }, "status": { "enum": [ "available", "unavailable" ], "type": "string", "description": "The status of the models and categories extraction. One of 'available', 'unavailable'", "title": "Models And Categories status", "$ref": "#/components/schemas/models-and-categories-status" }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/Category" }, "description": "Array of all the categories in the iModel." } } }
Was this page helpful?