Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 6e17b18

Browse files
committed
MINOR: add BCF import route
1 parent 8fa95bb commit 6e17b18

14 files changed

Lines changed: 222 additions & 101 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ Class | Method | HTTP request | Description
162162
*bimdata.BcfApi* | [**getViewpoint**](docs/BcfApi.md#getViewpoint) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{guid} | Retrieve a Viewpoint
163163
*bimdata.BcfApi* | [**getViewpoints**](docs/BcfApi.md#getViewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints | Retrieve all Viewpoints of a topic
164164
*bimdata.BcfApi* | [**getVisibilities**](docs/BcfApi.md#getVisibilities) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{guid}/visibility | Retrieve all visibilities of a viewpoint
165+
*bimdata.BcfApi* | [**importBcf**](docs/BcfApi.md#importBcf) | **POST** /bcf/2.1/projects/{id}/import | Import bcf-xml format into this project. If there are guid conflict, an error will be raised. If there are index conflicts, indexes of the imported file will be overriden with a new index. Author and assigned_to fields will be linked to existing users in the project. If no matching user are found, fields will be emptied. Only BCF 2.1 is supported
165166
*bimdata.BcfApi* | [**updateBcfProject**](docs/BcfApi.md#updateBcfProject) | **PATCH** /bcf/2.1/projects/{id} | Update some fields of a BCF project
166167
*bimdata.BcfApi* | [**updateComment**](docs/BcfApi.md#updateComment) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/comments/{guid} | Update some fields of a comment
167168
*bimdata.BcfApi* | [**updateExtensions**](docs/BcfApi.md#updateExtensions) | **PATCH** /bcf/2.1/projects/{projects_pk}/extensions | Update project extensions

docs/BcfApi.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Method | HTTP request | Description
3434
[**getViewpoint**](BcfApi.md#getViewpoint) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{guid} | Retrieve a Viewpoint
3535
[**getViewpoints**](BcfApi.md#getViewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints | Retrieve all Viewpoints of a topic
3636
[**getVisibilities**](BcfApi.md#getVisibilities) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{guid}/visibility | Retrieve all visibilities of a viewpoint
37+
[**importBcf**](BcfApi.md#importBcf) | **POST** /bcf/2.1/projects/{id}/import | Import bcf-xml format into this project. If there are guid conflict, an error will be raised. If there are index conflicts, indexes of the imported file will be overriden with a new index. Author and assigned_to fields will be linked to existing users in the project. If no matching user are found, fields will be emptied. Only BCF 2.1 is supported
3738
[**updateBcfProject**](BcfApi.md#updateBcfProject) | **PATCH** /bcf/2.1/projects/{id} | Update some fields of a BCF project
3839
[**updateComment**](BcfApi.md#updateComment) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/comments/{guid} | Update some fields of a comment
3940
[**updateExtensions**](BcfApi.md#updateExtensions) | **PATCH** /bcf/2.1/projects/{projects_pk}/extensions | Update project extensions
@@ -1811,6 +1812,64 @@ Name | Type | Description | Notes
18111812
- **Accept**: application/json
18121813

18131814

1815+
## importBcf
1816+
1817+
> importBcf(id, name)
1818+
1819+
Import bcf-xml format into this project. If there are guid conflict, an error will be raised. If there are index conflicts, indexes of the imported file will be overriden with a new index. Author and assigned_to fields will be linked to existing users in the project. If no matching user are found, fields will be emptied. Only BCF 2.1 is supported
1820+
1821+
Import bcf-xml format into this project Required scopes: bcf:write
1822+
1823+
### Example
1824+
1825+
```javascript
1826+
import bimdata from '@bimdata/bimdata-api-client';
1827+
let defaultClient = bimdata.ApiClient.instance;
1828+
// Configure API key authorization: Bearer
1829+
let Bearer = defaultClient.authentications['Bearer'];
1830+
Bearer.apiKey = 'YOUR API KEY';
1831+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
1832+
//Bearer.apiKeyPrefix = 'Token';
1833+
// Configure OAuth2 access token for authorization: bimdata_connect
1834+
let bimdata_connect = defaultClient.authentications['bimdata_connect'];
1835+
bimdata_connect.accessToken = 'YOUR ACCESS TOKEN';
1836+
// Configure OAuth2 access token for authorization: client_credentials
1837+
let client_credentials = defaultClient.authentications['client_credentials'];
1838+
client_credentials.accessToken = 'YOUR ACCESS TOKEN';
1839+
1840+
let apiInstance = new bimdata.BcfApi();
1841+
let id = 56; // Number | A unique integer value identifying this project.
1842+
let name = "name_example"; // String | Name of the project
1843+
apiInstance.importBcf(id, name).then(() => {
1844+
console.log('API called successfully.');
1845+
}, (error) => {
1846+
console.error(error);
1847+
});
1848+
1849+
```
1850+
1851+
### Parameters
1852+
1853+
1854+
Name | Type | Description | Notes
1855+
------------- | ------------- | ------------- | -------------
1856+
**id** | **Number**| A unique integer value identifying this project. |
1857+
**name** | **String**| Name of the project |
1858+
1859+
### Return type
1860+
1861+
null (empty response body)
1862+
1863+
### Authorization
1864+
1865+
[Bearer](../README.md#Bearer), [bimdata_connect](../README.md#bimdata_connect), [client_credentials](../README.md#client_credentials)
1866+
1867+
### HTTP request headers
1868+
1869+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
1870+
- **Accept**: Not defined
1871+
1872+
18141873
## updateBcfProject
18151874

18161875
> BcfProject updateBcfProject(id, data)

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ null (empty response body)
185185
186186
Create a classification
187187

188-
Bulk create available. You can either post an object or a list of objects. Is you post a list, the response will be a list (in the same order) of created objects or of errors if any If at least one create succeeded, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors If created classification already exists, it will not be duplicated and the previous one will be returned. You also can add a 'classification' filter on this endpoint. By ex: /classification?name='untec'. The name is case sensitive Required scopes: ifc:write
188+
Bulk create available. You can either post an object or a list of objects. Is you post a list, the response will be a list (in the same order) of created objects or of errors if any If at least one create succeeded, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors If created classification already exists, it will not be duplicated and the previous one will be returned. You also can add a 'classification' filter on this endpoint. By ex: /classification?name='untec'. The name is case sensitive Required scopes: ifc:write
189189

190190
### Example
191191

docs/ComponentsParent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**coloring** | [**[Coloring]**](Coloring.md) | | [optional]
8-
**visibility** | [**Visibility**](Visibility.md) | |
8+
**visibility** | [**Visibility**](Visibility.md) | | [optional]
99
**selection** | [**[Component]**](Component.md) | | [optional]
1010

1111

0 commit comments

Comments
 (0)