Uploads a design file to create a digital component.
Notes
This endpoint is to create a component from design file. Supported file extensions are '.rfa', '.dgn' and '.cel'. This is a long running activity that runs in background after the endpoint is called and creates a component by extracting information from the design file, e.g., category, application, manufacturer and other metadata found in the design file. Response object has links to upload the design file or type catalog file, if specified. Client must upload type catalog file before uploading design file. Once files are uploaded, component creation activity can be tracked using job endpoint returned in the 'Location' header. Once job succeeds, component can be fetched using 'component' property provided under _links in job endpoint response.
Referenced Entities
A component can have referenced entities, e.g catalogs. These values should be valid Ids of existing entities.
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.
Authorization
User must be an Organization Administrator for the Organization or have Upload
permission assigned at the organization level.
An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.
Rate limits
All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
UploadComponent (create)
Name of the design file to be uploaded.
Display name of the component.
Description of the component.
Associated application Id, must be a string value of valid GUID of existing application.
Associated category Id, must be a string value of valid GUID of existing category.
Associated manufacturer Id, must be a string value of valid GUID of existing manufacturer.
Hashtags assigned to component.
Referenced catalogs of the component.
Specifies if component is a TypeCatalog.
Example
{ "fileName": "door.rfa", "componentName": "Wooden Door", "description": "A wooden door", "searchTags": [ "door", "woodendoor" ], "catalogs": [], "category": null, "application": null, "manufacturer": null, "isTypeCatalog": false }
Response 202 Accepted
Accepted
{ "uploadComponent": { "fileName": "door.rfa", "componentName": "Wooden Door", "description": "A wooden door", "sessionId": "fu791e2d-e3e2-4c38-b5d9-0573a01e5934", "searchTags": [ "door", "woodendoor" ], "isTypeCatalog": true, "_links": { "catalogs": [{ "href": "https://api.bentley.com/library/catalogs/c7391e2d-e3e2-4c38-b5d9-0573a01e590d" }, { "href": "https://api.bentley.com/library/catalogs/ht391e2d-e3e2-4c38-b5d9-0573a01e597j" } ], "typeCatalogUploadUrl": { "href": "https://componentscenprodeussa01.blob.core.windows.net/private-temporary-type-catalog-files/2517765788748761853_4496211b-322e-4f3a-80f4-cc97cdad2e2a.typecatalog?sv=2018-03-28&sr=b&sig=zGVjkn9X90nAqJawdgx0EK02zKzdNso7zlCxQuYDvM4%3D&se=2021-07-08T06%3A25%3A25Z&sp=rcw" }, "designFileUploadUrl": { "href": "https://componentscenprodeussa01.blob.core.windows.net/private-temporary-design-files/2517765788748761853_4496211b-322e-4f3a-80f4-cc97cdad2e2a.design?sv=2018-03-28&sr=b&sig=pPQUu7E5yo9ZOyHnhLtqoDbfh5qaQB1mmplgjOoQB%2BM%3D&se=2021-07-08T06%3A25%3A25Z&sp=rcw" } } } }
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 to upload component.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 422 Unprocessable Entity
Invalid request to upload component.
{ "error": { "code": "InvalidUploadComponentRequest", "message": "Cannot upload component.", "details": [{ "code": "MissingRequiredProperty", "message": "Required property is missing.", "target": "fileName" }, { "code": "InvalidValue", "message": "'sample.txt' is not supported format. File extension must be 'rfa', 'dgn' or 'cel'.", "target": "fileName" }, { "code": "InvalidValue", "message": "Provided Referenced entities not valid." } ] } }
Response 429 Too many requests
This response indicates that the user has sent too many requests in a given amount of time.
{ "error": { "code": "TooManyRequests", "message": "More requests were received than the subscription rate-limit allows." } }
Response headers
The number of requests exceeds the rate-limit for the client subscription.
UploadComponent (create)
UploadComponent represents information required to create a digital component from a design file and any associated entities to that component.
Name of the design file to be uploaded.
Display name of the component.
Description of the component.
Associated application Id, must be a string value of valid GUID of existing application.
Associated category Id, must be a string value of valid GUID of existing category.
Associated manufacturer Id, must be a string value of valid GUID of existing manufacturer.
Hashtags assigned to component.
Referenced catalogs of the component.
Specifies if component is a TypeCatalog.
{ "type": "object", "title": "UploadComponent (create)", "description": "UploadComponent represents information required to create a digital component from a design file and any associated entities to that component.", "properties": { "fileName": { "type": "string", "description": "Name of the design file to be uploaded." }, "componentName": { "type": "string", "description": "Display name of the component." }, "description": { "type": "string", "description": "Description of the component." }, "application": { "nullable": true, "description": "Associated application Id, must be a string value of valid GUID of existing application." }, "category": { "nullable": true, "description": "Associated category Id, must be a string value of valid GUID of existing category." }, "manufacturer": { "nullable": true, "description": "Associated manufacturer Id, must be a string value of valid GUID of existing manufacturer." }, "searchTags": { "type": "array", "description": "Hashtags assigned to component.", "items": { "description": "List of hashtags.", "type": "string" } }, "catalogs": { "type": "array", "description": "Referenced catalogs of the component.", "items": { "description": "List of catalog Ids.", "type": "string" } }, "isTypeCatalog": { "type": "boolean", "description": "Specifies if component is a TypeCatalog." } }, "additionalProperties": false }
UploadComponent (response)
Upload component response containing uploadComponent.
{ "description": "Upload component response containing uploadComponent.", "title": "UploadComponent (response)", "type": "object", "properties": { "uploadComponent": { "description": "Full representation of the uploadComponent.", "$ref": "#/components/schemas/UploadComponent" } }, "additionalProperties": false }
UploadComponent
UploadComponent represents information required to create a digital component and urls to upload design/type catalog files.
Name of the design file to be uploaded.
Display name of the component.
Description of the component.
Unique identifier of upload component session.
Hashtags assigned to component.
Specifies if component is a TypeCatalog.
{ "type": "object", "description": "UploadComponent represents information required to create a digital component and urls to upload design/type catalog files.", "properties": { "fileName": { "type": "string", "description": "Name of the design file to be uploaded." }, "componentName": { "type": "string", "description": "Display name of the component." }, "description": { "type": "string", "description": "Description of the component." }, "sessionId": { "type": "string", "description": "Unique identifier of upload component session." }, "searchTags": { "type": "array", "description": "Hashtags assigned to component.", "items": { "description": "List of hashtags.", "type": "string" } }, "isTypeCatalog": { "type": "boolean", "description": "Specifies if component is a TypeCatalog." }, "_links": { "$ref": "#/components/schemas/upload-component-links", "description": "Contains the hyperlinks to the related data of the UploadComponent." } }, "additionalProperties": false }
Upload Component Links
Hyperlinks to related data which complements this entity.
{ "type": "object", "title": "Upload Component Links", "description": "Hyperlinks to related data which complements this entity.", "properties": { "catalogs": { "type": "array", "description": "Links of referenced catalogs.", "items": { "description": "List of catalogs.", "$ref": "#/components/schemas/Link" } }, "application": { "$ref": "#/components/schemas/Link", "description": "Link to associated application of the component." }, "category": { "$ref": "#/components/schemas/Link", "description": "Link to associated category of the component." }, "manufacturer": { "$ref": "#/components/schemas/Link", "description": "Link to associated manufacturer of the component." }, "typeCatalogUploadUrl": { "$ref": "#/components/schemas/Link", "description": "Link to upload type catalog file of the component." }, "designFileUploadUrl": { "$ref": "#/components/schemas/Link", "description": "Link to upload design file of the component." } }, "additionalProperties": false }
Link
{ "type": "object", "properties": { "href": { "type": "string" } }, "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?