Patch an existing detector
Patch can be used for changing the display name, description, or documentation URL of a detector. Any combination of these fields can be provided.
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
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v2+json is recommended.
Request body
Detector patch payload
Optional new description for the detector.
Optional new display name for the detector.
Optional new documentation URL for the detector.
Example
{ "displayName": "bentley-cracks-s2d", "description": "Detect cracks in concrete infrastructure to enable defect inspection workflows.", "documentationUrl": "https://docs.example.com/detector" }
Response 200 OK
This response indicates that the request was successful.
{ "detector": { "name": "cracks-detector", "displayName": "Cracks detector", "description": "Detects all the cracks within a scene.", "type": "PhotoObjectDetector", "documentationUrl": "https://www.bentley.com", "versions": [{ "creationDate": "2025-08-11T15:11:24.2712971+00:00", "versionNumber": "1.0", "status": "Ready", "creatorId": "4f2d47ac-e318-46dc-ae53-06d71c9ff79e", "capabilities": { "labels": ["Crack Object"], "exports": ["Lines"] } }] } }
Response 400 Bad Request
Bad Request
{ "error": { "code": "InvalidRealityAnalysisRequest", "message": "Invalid request to Reality Modeling.", "details": [{ "code": "InvalidProperty", "message": "Special characters are not allowed.", "target": "Detector.DisplayName" }] } }
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 403 Forbidden
This response indicates that user does not have required permissions for this operation.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
Not Found
{ "error": { "code": "DetectorNotFound", "message": "Requested detector 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 }
Detector type
Available types for AI library detectors.
{ "enum": [ "PhotoObjectDetector", "PhotoSegmentationDetector", "OrthophotoSegmentationDetector", "PointCloudSegmentationDetector" ], "title": "Detector type", "description": "Available types for AI library detectors." }
DetailedError
Contains error information and an array of more specific errors.
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", "details" ], "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." }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/Error" }, "description": "Optional array of more specific errors." }, "message": { "type": "string", "description": "A human-readable representation of the error." } }, "description": "Contains error information and an array of more specific errors.", "additionalProperties": true }
Detector patch payload
Patch information to be applied to the detector.
Optional new description for the detector.
Optional new display name for the detector.
Optional new documentation URL for the detector.
{ "type": "object", "title": "Detector patch payload", "properties": { "description": { "type": "string", "default": null, "nullable": true, "description": "Optional new description for the detector." }, "displayName": { "type": "string", "default": null, "nullable": true, "description": "Optional new display name for the detector." }, "documentationUrl": { "type": "string", "default": null, "nullable": true, "description": "Optional new documentation URL for the detector." } }, "description": "Patch information to be applied to the detector.", "additionalProperties": false }
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 }
Detector version
Details of detector version.
User Id of the version creator.
Creation date of the version.
Version number.
{ "type": "object", "title": "Detector version", "required": [ "creationDate", "versionNumber", "status", "capabilities" ], "properties": { "status": { "$ref": "#/components/schemas/DetectorVersionStatus" }, "creatorId": { "type": "string", "default": null, "nullable": true, "description": "User Id of the version creator." }, "capabilities": { "$ref": "#/components/schemas/DetectorVersionCapabilities" }, "creationDate": { "type": "string", "format": "date-time", "description": "Creation date of the version." }, "versionNumber": { "type": "string", "description": "Version number." } }, "description": "Details of detector version.", "additionalProperties": false }
Detector details
Details of detector.
Name of the detector.
Description of the detector.
Display name of the detector.
Url of the detector's documentation.
{ "type": "object", "title": "Detector details", "required": [ "name", "type", "versions" ], "properties": { "name": { "type": "string", "description": "Name of the detector." }, "type": { "$ref": "#/components/schemas/DetectorType" }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/DetectorVersion" }, "description": "All existing versions of the detector." }, "description": { "type": "string", "default": null, "nullable": true, "description": "Description of the detector." }, "displayName": { "type": "string", "default": null, "nullable": true, "description": "Display name of the detector." }, "documentationUrl": { "type": "string", "default": null, "nullable": true, "description": "Url of the detector's documentation." } }, "description": "Details of detector.", "additionalProperties": false }
Detector export type
Available types for AI library detector exports.
{ "enum": [ "Objects", "Lines", "Polygons", "Locations" ], "title": "Detector export type", "description": "Available types for AI library detector exports." }
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", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/DetailedError", "description": "Error Detailed 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 }
Detector patch response
Updated detector.
{ "type": "object", "title": "Detector patch response", "required": [ "detector" ], "properties": { "detector": { "$ref": "#/components/schemas/DetectorResponse" } }, "description": "Updated detector.", "additionalProperties": false }
Detector version status
Available types for AI library detector version status.
{ "enum": [ "AwaitingData", "Ready" ], "title": "Detector version status", "description": "Available types for AI library detector version status." }
Detector version capabilities
Capabilities of detector version.
Labels of the detector version.
{ "type": "object", "title": "Detector version capabilities", "required": [ "labels" ], "properties": { "labels": { "type": "array", "items": { "type": "string" }, "description": "Labels of the detector version." }, "exports": { "type": "array", "items": { "$ref": "#/components/schemas/DetectorExportType" }, "default": null, "nullable": true, "description": "Exports of the detector version." } }, "description": "Capabilities of detector version.", "additionalProperties": false }
Was this page helpful?