Create a new detector.
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 headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
Detector create payload
Example
{ "detector": { "name": "traffic-signs", "description": "traffic signs detector", "type": "PhotoObjectDetector", "documentationUrl": "https://www.bentley.com", "version": "1.0", "labels": [ "signs" ], "exports": [ "Objects" ] } }
Response 201 Created
This response indicates that the detector was successfully created.
{ "detector": { "name": "traffic-signs", "description": "traffic signs detector", "type": "PhotoObjectDetector", "documentationUrl": "https://www.bentley.com", "versions": [{ "creationDate": "2025-04-16T12:11:48.8662984Z", "version": "1.0", "status": "AwaitingData", "creatorId": "b4ebc9f7-31b3-482f-a2be-aaeb91516ebc", "capabilities": { "labels": [ "signs" ], "exports": [ "Objects" ] } }] }, "_links": { "completeUrl": { "href": "detectors/traffic-signs/version/1.0/complete" }, "uploadUrl": { "href": "https://cicsdetectorseussa01.blob.core.windows.net/78e3a82d-076e-4d1d-b8ef-ab0625fbb856/traffic-signs-1.0.zip?sv=2024-08-04&se=2025-04-16T12%3A31%3A48Z&sr=b&sp=w&sig=***REMOVED***" } } }
Response 400 Bad Request
The 400 (Bad Request) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax).
{ "error": { "code": "InvalidRealityDataAnalysisRequest", "message": "Cannot create detector.", "details": [{ "code": "InvalidValue", "message": "Invalid detector type.", "target": "detector.type" }] } }
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 409 Conflict
This response indicates that the user tried to create a resource that already exists.
{ "error": { "code": "DetectorExists", "message": "This version of the detector already exists.", "target": "detector.version" } }
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." }
link
Hyperlink container.
{ "type": "object", "properties": { "href": { "type": "string", "description": "Hyperlink container." } }, "additionalProperties": false }
Detector create payload
{ "title": "Detector create payload", "type": "object", "properties": { "detector": { "$ref": "#/components/schemas/detector-create-details", "description": "Detector details." } }, "required": [ "detector" ], "additionalProperties": false }
Detector create details
Name of the detector.
Description of the detector.
Url to the detector's documentation.
Version of the detector in X.Y format.
Labels of the detector.
{ "title": "Detector create details", "type": "object", "properties": { "name": { "description": "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 to the detector's documentation.", "type": "string" }, "version": { "description": "Version of the detector in X.Y format.", "type": "string" }, "labels": { "description": "Labels of the detector.", "type": "array", "items": { "type": "string" } }, "exports": { "description": "Exports of the detector.", "type": "array", "items": { "$ref": "#/components/schemas/detector-export-type" } } }, "required": [ "name", "description", "type", "version", "labels" ], "additionalProperties": false }
Detector create response
{ "title": "Detector create response", "type": "object", "properties": { "detector": { "description": "Detector details.", "$ref": "#/components/schemas/detector-response" }, "_links": { "description": "Contains the hyperlinks related to the detector creation.", "$ref": "#/components/schemas/detector-create-response-links" } }, "required": [ "detector", "_links" ], "additionalProperties": false }
Detector details
Name of the detector.
Description of the detector.
Url of the detector's documentation.
{ "title": "Detector details", "type": "object", "properties": { "name": { "description": "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", "description", "type", "versions" ], "additionalProperties": false }
Detector version
Creation date of the version.
Version number.
User Id of the version creator.
{ "title": "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 }
URLs for uploading and completing a detector
{ "title": "URLs for uploading and completing a detector", "type": "object", "properties": { "completeUrl": { "description": "URL to mark the completion of the detector creation process.", "$ref": "#/components/schemas/link" }, "uploadUrl": { "description": "URL to upload the detector zip file.", "$ref": "#/components/schemas/link" } }, "required": [ "completeUrl", "uploadUrl" ], "additionalProperties": false }
Capabilities of detector version
Labels of the detector version.
{ "title": "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 }
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?