Start a mesh export from the iModel. Exports are persisted until deleted.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Request body
StartExport
ID of the iModel to extract from.
ID of the changeset to extract from. If omitted, export latest.
Type of mesh to create, Accepted value are IMODEL, CESIUM and 3DTiles (or 3DTILES). If omitted, defaults to 3DTiles.
A list of key-value pair configuration items forwarded to the tiler executable to customize tile generation behavior.
Date when job metadata was last modified.
Example
{ "iModelId": "b80f4fc2-4dbb-42c5-bb1f-f5aace3977dc", "changesetId": "ed94ed9a0704918d36eeb620219f5e17d8858858", "exportType": "3DTiles" }
Response 202 Accepted
The export was accepted and will be processed
{ "export": { "id": "fc3aa1e5-5196-4dd9-a73e-4cfda693e576", "displayName": "My iModel", "status": "NotStarted", "lastModified": "2024-08-22T03:18:43Z", "request": { "iModelId": "b80f4fc2-4dbb-42c5-bb1f-f5aace3977dc", "changesetId": "ed94ed9a0704918d36eeb620219f5e17d8858858", "exportType": "3DTiles" } } }
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
Requested iModel is not available.
{ "error": { "code": "IModelNotFound", "message": "Requested iModel is not available." } }
Response 422 Unprocessable Entity
Cannot create export job.
{ "error": { "code": "InvalidMeshExportRequest", "message": "Cannot create export job.", "details": [{ "code": "InvalidRequestBody", "message": "iModelId cannot be empty.", "target": "iModelId" }] } }
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.
Link
An href link reference.
Http reference
{ "required": [ "href" ], "type": "object", "properties": { "href": { "type": "string", "description": "Http reference", "example": "https://api.bentley.com/path1/path2/id" } }, "additionalProperties": false, "description": "An href link reference." }
StartExport exportType
Type of mesh to create, Accepted value are IMODEL, CESIUM and 3DTiles (or 3DTILES). If omitted, defaults to 3DTiles.
{ "enum": [ "IMODEL", "CESIUM", "3DTILES", "3DTiles" ], "type": "string", "description": "Type of mesh to create, Accepted value are IMODEL, CESIUM and 3DTiles (or 3DTILES). If omitted, defaults to 3DTiles.", "title": "StartExport exportType" }
StartExport
Request body for starting a mesh export.
ID of the iModel to extract from.
ID of the changeset to extract from. If omitted, export latest.
Type of mesh to create, Accepted value are IMODEL, CESIUM and 3DTiles (or 3DTILES). If omitted, defaults to 3DTiles.
A list of key-value pair configuration items forwarded to the tiler executable to customize tile generation behavior.
Date when job metadata was last modified.
{ "required": [ "iModelId", "changesetId" ], "type": "object", "properties": { "iModelId": { "type": "string", "description": "ID of the iModel to extract from." }, "changesetId": { "type": "string", "description": "ID of the changeset to extract from. If omitted, export latest." }, "exportType": { "enum": [ "IMODEL", "CESIUM", "3DTILES", "3DTiles" ], "type": "string", "description": "Type of mesh to create, Accepted value are IMODEL, CESIUM and 3DTiles (or 3DTILES). If omitted, defaults to 3DTiles.", "title": "StartExport exportType", "$ref": "#/components/schemas/StartExport-exportType" }, "tilerConfig": { "title": "Tiler Config", "maxItems": 100, "minItems": 1, "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/TilerConfigItem" }, "description": "A list of key-value pair configuration items forwarded to the tiler executable to customize tile generation behavior." }, "lastModified": { "type": "string", "description": "Date when job metadata was last modified.", "format": "date-time" } }, "additionalProperties": false, "description": "Request body for starting a mesh export.", "example": { "iModelId": "b80f4fc2-4dbb-42c5-bb1f-f5aace3977dc", "changesetId": "ed94ed9a0704918d36eeb620219f5e17d8858858", "exportType": "3DTiles", "tilerConfig": [ { "key": "maxTileSize", "value": 128 }, { "key": "enableCompression", "value": true }, { "key": "outputFormat", "value": "glb" } ] } }
TilerConfigItem
A key-value configuration item for the tilerConfig.
{ "required": [ "key", "value" ], "type": "object", "properties": { "key": { "maxLength": 256, "minLength": 1, "type": "string", "description": "Configuration key name." }, "value": { "anyOf": [ { "maxLength": 1000, "minLength": 1, "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "description": "Configuration value; may be a string, number, or boolean." } }, "additionalProperties": false, "description": "A key-value configuration item for the tilerConfig." }
ExportResultBody exportType
Type of mesh exported.
{ "enum": [ "IMODEL", "CESIUM", "3DTILES", "3DTiles" ], "type": "string", "description": "Type of mesh exported.", "title": "ExportResultBody exportType" }
ExportResultBody
The original export request body stored with the result.
ID of the iModel.
Context/iTwin ID of the export (kept for backwards compatibility).
iTwin ID of the export.
ID of the changeset extracted from.
Index of the changeset.
{ "required": [ "iModelId", "exportType", "changesetId" ], "type": "object", "properties": { "iModelId": { "type": "string", "description": "ID of the iModel." }, "contextId": { "type": "string", "description": "Context/iTwin ID of the export (kept for backwards compatibility)." }, "iTwinId": { "type": "string", "description": "iTwin ID of the export." }, "changesetId": { "type": "string", "description": "ID of the changeset extracted from." }, "exportType": { "enum": [ "IMODEL", "CESIUM", "3DTILES", "3DTiles" ], "type": "string", "description": "Type of mesh exported.", "title": "ExportResultBody exportType", "$ref": "#/components/schemas/ExportResultBody-exportType" }, "changesetIndex": { "type": "string", "description": "Index of the changeset." }, "tilerConfig": { "title": "Tiler Config", "maxItems": 100, "minItems": 1, "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/TilerConfigItem" }, "description": "A list of key value pairs forwarded to the tiler executable." } }, "additionalProperties": false, "description": "The original export request body stored with the result." }
ExportResponse
Response containing the details of a single export.
{ "type": "object", "properties": { "export": { "$ref": "#/components/schemas/Export" } }, "additionalProperties": false, "description": "Response containing the details of a single export.", "example": { "export": { "id": "fc3aa1e5-5196-4dd9-a73e-4cfda693e576", "displayName": "My iModel", "status": "Complete", "lastModified": "2024-08-22T03:18:43Z", "request": { "iModelId": "b80f4fc2-4dbb-42c5-bb1f-f5aace3977dc", "changesetId": "ed94ed9a0704918d36eeb620219f5e17d8858858", "exportType": "3DTiles" }, "_links": { "mesh": { "href": "https://example.cloudfront.net/mesh-export/fc3aa1e5-5196-4dd9-a73e-4cfda693e576" } } } } }
ExportStatus
Status of the export.
{ "enum": [ "NotStarted", "InProgress", "Complete", "Invalid" ], "type": "string", "description": "Status of the export." }
ExportDirStructure
List of export directory children along with their size, in bytes.
ExportMetrics
Memory and CPU usage metrics from the graphics and tiles producer.
ExportStatsDisplay
Statistics of the export job. This obsoletes the Consumption type.
Size of the iModel .bin file, in bytes
Size of the exported and compressed tiles, in bytes.
Size of the exported tiles, in bytes.
Starting date of the export job, pretty-printed.
Duration of the export job, in milliseconds.
Disk size, in bytes.
Free disk space, in bytes.
Export directory size, in bytes.
{ "type": "object", "properties": { "iModelSize": { "type": "number", "description": "Size of the iModel .bin file, in bytes" }, "compressedSize": { "type": "number", "description": "Size of the exported and compressed tiles, in bytes." }, "rawSize": { "type": "number", "description": "Size of the exported tiles, in bytes." }, "startTime": { "type": "string", "description": "Starting date of the export job, pretty-printed.", "format": "date-time" }, "duration": { "type": "number", "description": "Duration of the export job, in milliseconds." }, "diskSize": { "type": "number", "description": " Disk size, in bytes." }, "freeDiskSpace": { "type": "number", "description": "Free disk space, in bytes." }, "exportDirSize": { "type": "number", "description": "Export directory size, in bytes." }, "exportDirStructure": { "$ref": "#/components/schemas/ExportDirStructure" }, "metrics": { "$ref": "#/components/schemas/ExportMetrics" } }, "additionalProperties": false, "description": "Statistics of the export job. This obsoletes the Consumption type." }
Export
An export with all its details.
ID of the export request.
Name of the exported iModel
Date when job metadata was last modified
Error message for Invalid exports.
{ "required": [ "id", "displayName", "status", "lastModified", "request" ], "type": "object", "properties": { "id": { "type": "string", "description": "ID of the export request." }, "displayName": { "type": "string", "description": "Name of the exported iModel" }, "status": { "$ref": "#/components/schemas/ExportStatus" }, "lastModified": { "type": "string", "description": "Date when job metadata was last modified" }, "request": { "$ref": "#/components/schemas/ExportResultBody" }, "stats": { "$ref": "#/components/schemas/ExportStatsDisplay" }, "error": { "type": "string", "description": "Error message for Invalid exports." }, "_links": { "type": "object", "properties": { "mesh": { "$ref": "#/components/schemas/Link" } }, "additionalProperties": false } }, "additionalProperties": false, "description": "An export with all its details.", "example": { "id": "fc3aa1e5-5196-4dd9-a73e-4cfda693e576", "displayName": "My iModel", "status": "Complete", "request": { "iModelId": "b80f4fc2-4dbb-42c5-bb1f-f5aace3977dc", "changesetId": "ed94ed9a0704918d36eeb620219f5e17d8858858", "exportType": "3DTiles" }, "_links": { "mesh": { "href": "https://example.cloudfront.net/mesh-export/fc3aa1e5-5196-4dd9-a73e-4cfda693e576" } } } }
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.
{ "required": [ "code", "message" ], "type": "object", "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 } }, "description": "Contains error information." }
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.
{ "title": "Error Response", "required": [ "error" ], "type": "object", "properties": { "error": { "$ref": "#/components/schemas/Error" } }, "additionalProperties": false, "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." }
Was this page helpful?