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.v1+json
is recommended.
Request body
Modify Detector
Example
{ "detector": { "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-03-11T15:11:24.2712971Z", "version": "1.0", "status": "Ready", "creatorId": "d2b5b8e7-8248-49a3-94ac-b097a7a67b6d", "capabilities": { "labels": [ "Crack Object" ], "exports": [ "Lines" ] } }] } }
Response 400 Bad Request
Bad Request
{ "error": { "code": "InvalidRealityDataAnalysisRequest", "message": "Invalid request to Reality Data Analysis.", "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.
Detector type
Available types for AI library detectors.
{ "title": "Detector type", "enum": [ "PhotoObjectDetector", "PhotoSegmentationDetector", "OrthophotoSegmentationDetector", "PointCloudSegmentationDetector" ], "description": "Available types for AI library detectors." }
Detector export type
Available types for AI library detector exports.
{ "title": "Detector export type", "enum": [ "Objects", "Lines", "Polygons", "Locations" ], "description": "Available types for AI library detector exports." }
Detector version status
Available types for AI library detector version status.
{ "title": "Detector version status", "enum": [ "AwaitingData", "Ready" ], "description": "Available types for AI library detector version status." }
Detector patch response
Updated detector.
{ "title": "Detector patch response", "description": "Updated detector.", "type": "object", "properties": { "detector": { "description": "Detector details.", "$ref": "#/components/schemas/detector-response" } }, "required": [ "detector" ], "additionalProperties": false }
Detector details
Details of detector.
Name of the detector.
Display name of the detector.
Description of the detector.
Url of the detector's documentation.
{ "title": "Detector details", "description": "Details of detector.", "type": "object", "properties": { "name": { "description": "Name of the detector.", "type": "string" }, "displayName": { "description": "Display name of the detector.", "type": "string" }, "description": { "description": "Description of the detector.", "type": "string" }, "type": { "description": "Type of the detector.", "$ref": "#/components/schemas/detector-type" }, "documentationUrl": { "description": "Url of the detector's documentation.", "type": "string" }, "versions": { "description": "All existing versions of the detector.", "type": "array", "items": { "$ref": "#/components/schemas/detector-version" } } }, "required": [ "name", "type", "versions" ], "additionalProperties": false }
Detector version
Details of detector version.
Creation date of the version.
Version number.
User Id of the version creator.
{ "title": "Detector version", "description": "Details of detector version.", "type": "object", "properties": { "creationDate": { "description": "Creation date of the version.", "type": "string", "format": "date-time" }, "version": { "description": "Version number.", "type": "string" }, "status": { "description": "Status of the version.", "$ref": "#/components/schemas/detector-version-status" }, "creatorId": { "description": "User Id of the version creator.", "type": "string" }, "capabilities": { "description": "Capabilities of the version.", "$ref": "#/components/schemas/detector-version-capabilities" } }, "required": [ "creationDate", "version", "status" ], "additionalProperties": false }
Detector version capabilities
Capabilities of detector version.
Labels of the detector version.
{ "title": "Detector version capabilities", "description": "Capabilities of detector version.", "type": "object", "properties": { "labels": { "description": "Labels of the detector version.", "type": "array", "items": { "type": "string" } }, "exports": { "description": "Exports of the detector version.", "type": "array", "items": { "$ref": "#/components/schemas/detector-export-type" } } }, "additionalProperties": false }
Detector Update
Properties that can be updated for a detector.
Optional new display name for the detector.
Optional new description for the detector.
Optional new documentation URL for the detector.
{ "title": "Detector Update", "description": "Properties that can be updated for a detector.", "type": "object", "properties": { "displayName": { "type": "string", "description": "Optional new display name for the detector." }, "description": { "type": "string", "description": "Optional new description for the detector." }, "documentationUrl": { "type": "string", "description": "Optional new documentation URL for the detector." } }, "additionalProperties": false }
Modify Detector
Patch information to be applied to the detector.
{ "title": "Modify Detector", "description": "Patch information to be applied to the detector.", "type": "object", "properties": { "detector": { "$ref": "#/components/schemas/detector-update" } }, "additionalProperties": false }
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?