Named Composite Items
Note: The nsfilter (namespace filter) query parameter is mandatory for every request. It sets the context, helping you look up resources within that namespace. Example: GET /itemsvc/api/v1/nameduseritems?nsfilter=proj_DrZrSNrW
Create NamedCompositeItems#
Endpoints#
POST /itemsvc/api/v1/nameduseritemsRequest#
Query#
nsfilter- namespace context (Required)
Request body#
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Readable long-form name | Required |
_shortName | String | An abbreviated name up to 22 characters that is used for reference | Required |
_description | String | Describes the purpose of the NamedCompositeItem | Required |
_namespaces | String | An array of namespaces you want to add the NamedUserCollection to | Required |
_userType | String | A user-defined type for the NamedCompositeItem that you can use to distinguish or group it by. | Required |
_itemClass | String | Enter "NamedUserCollection". | Required |
_version._userAttributes | Object | Add an object with user-defined properties and their values. | Required |
Request example#
[ { "_namespaces": [ "lntpurelocal_Xw6AQru7" ], "_name": "General Medical Architecture", "_shortName": "genmedarch", "_itemClass": "NamedCompositeItem", "_userType": "bim_model", "_description": "General Medical Architecture model with Doors view", "_version": { "_userAttributes": { "accountid": 4, "modelid": 6, "file_name": "General Medical Architecture.bimpk", "projectid": 5 } }, "_kind": "collection" }]Response#
Response codes#
| Code | Description |
|---|---|
201 | Created |
400 | Bad Request |
Response data example#
{ "_pageSize": 1, "_list": [ { "_uri": "/nameduseritems/5cee918afa298d0d3e34e2fe", "_name": "General Medical Architecture", "_userType": "bim_model", "_tipId": "5cee918afa298d0d3e34e2ff", "_versions": [ { "_userAttributes": { "accountid": 4, "modelid": 6, "file_name": "General Medical Architecture.bimpk", "projectid": 5 }, "_userItemDbId": "5cee918afa298d0d3e34e2fe", "_id": "5cee918afa298d0d3e34e2ff", "_isTip": true, "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559138698055, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559138698055 }, "_version": 1 } ], "_irn": "itemsvc:nameduseritem:5cee918afa298d0d3e34e2fe", "_namespaces": [ "lntpurelocal_Xw6AQru7" ], "_nextVersion": 2, "_shortName": "genmedarch", "_tipVersion": 1, "_versionsCount": 1, "_itemClass": "NamedCompositeItem", "_userItemId": "genmedarch_AGo78KrigZ", "_id": "5cee918afa298d0d3e34e2fe", "_description": "General Medical Architecture model with Doors view", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559138698037, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559138698037 }, "_kind": "collection" } ], "_offset": 0, "_total": 1}Get all NamedCompositeItems#
Optionally filtered by query
Endpoints#
GET /itemsvc/api/v1/nameduseritemsRequest#
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
query | Object | Pass a query object with query parameters and values based on the NamedUserCollection class. You can also use query operators. To query all versions of NamedUserCollections rather than just the latest versions, add the query property and value _versions.all: true. For query examples, see Query parameter examples. | Optional |
project | Object | Field projections to exclude or include fields in the response, for example, project={"_metadata":0}. | Optional |
page | Object | Pass a Page object that defines the response pagination, for example, ?page={"_offset": 0, "_pageSize" 100} | Optional |
sort | Object | Pass a sort object to define the response sort order by a given property, using 1 for ascending sort and -1 for descending sort, for example, ?sort={"_name":1} | Optional |
userItemVersionId | Object | Lookup RelatedItems for a given NamedUserCollection version, rather than the current version. | Optional |
nsfilter | String | namespace context | Required |
Query parameter example#
# searches by name, the response would have tip version only:?query={"_name": "General Medical Architecture", "_itemClass": "NamedCompositeItem"}
# searches by item class, has all the versions??query={"_name": "General Medical Architecture", "_itemClass": "NamedCompositeItem","_versions.all":true}
# searches against all the versions and returns all the versions matching?query={"$and": [{"_itemClass": "NamedCompositeItem"},{"_versions._userAttributes.key":"value"}],"_versions.all":true}
# searches against latest version?query={"$and": [{"_itemClass": "NamedCompositeItem"},{"_versions._userAttributes.key":"value":"value"}]} Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
Response data example#
{ "_pageSize": 1, "_list": [ { "_uri": "/nameduseritems/5cee8e56fa298d0d3e34e2f1", "_name": "General Medical Architecture", "_userType": "bim_model", "_tipId": "5cef97082855127c3f55719a", "_versions": [ { "_userAttributes": { "accountid": 4, "versionid": 7, "modelid": 6, "file_name": "General Medical Architecture.bimpk", "projectid": 5, "version_guid": "edc07b2e-9e09-47ee-8538-45e001626917" }, "_userItemDbId": "5cee8e56fa298d0d3e34e2f1", "_id": "5cee8e56fa298d0d3e34e2f2", "_isTip": false, "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559137878344, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559205640894 }, "_version": 1 }, { "_userAttributes": { "fileVersionId": "5d7dfba3-2fb4-48dd-89e9-64b51fd5c6c1", "fileId": "0218ec62-6e35-496a-b3ab-ca87b812db94" }, "_userItemDbId": "5cee8e56fa298d0d3e34e2f1", "_id": "5cef97082855127c3f55719a", "_isTip": true, "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559205640806, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559205640897 }, "_version": 2 } ], "_irn": "itemsvc:nameduseritem:5cee8e56fa298d0d3e34e2f1", "_namespaces": [ "lntpurelocal_Xw6AQru7" ], "_nextVersion": 3, "_shortName": "genmedarch", "_tipVersion": 2, "_versionsCount": 2, "_itemClass": "NamedCompositeItem", "_userItemId": "genmedarch_3UHJVExGXH", "_id": "5cee8e56fa298d0d3e34e2f1", "_description": "General Medical Architecture model with Doors view", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559137878343, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559205640883 }, "_kind": "collection" } ], "_offset": 0, "_total": 1}Get NamedCompositeItem by ID#
Endpoints#
GET /itemsvc/api/v1/nameduseritems/{id}Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedCompositeItem _id or _userItemId value. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
project | String | Field projections to exclude or include fields in the response, for example, project={"_metadata":0}. | Optional |
nsfilter | String | namespace context | Required |
Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
404 | File Not Found |
Response data#
{ "_uri": "/nameduseritems/5d8ac97ff3e20c52ec935141", "_name": "General Medical Architecture", "_userType": "bim_model", "_tipId": "5d8ac9abf3e20c52ec935143", "_versions": [ { "_userAttributes": { "userDataType": "string" }, "_userItemDbId": "5d8ac97ff3e20c52ec935141", "_id": "5d8ac9abf3e20c52ec935143", "_isTip": true, "_metadata": { "_updatedById": "ebb6d8c2-f271-4eb8-8749-6517d44f80dd", "_createdAt": 1569376683679, "_createdById": "ebb6d8c2-f271-4eb8-8749-6517d44f80dd", "_updatedAt": 1569376683737 }, "_version": 2 } ], "_irn": "itemsvc:nameduseritem:5d8ac97ff3e20c52ec935141", "_namespaces": [ "dgdfg_h2xdEg7S" ], "_nextVersion": 3, "_shortName": "genmedarch", "_tipVersion": 2, "_versionsCount": 2, "_itemClass": "NamedCompositeItem", "_userItemId": "genmedarch_pYP2Dlj4oL", "_id": "5d8ac97ff3e20c52ec935141", "_description": "General Medical Architecture model with Doors view", "_metadata": { "_updatedById": "ebb6d8c2-f271-4eb8-8749-6517d44f80dd", "_createdAt": 1569376639059, "_createdById": "ebb6d8c2-f271-4eb8-8749-6517d44f80dd", "_updatedAt": 1569376683715 }, "_kind": "collection"}Delete Named User Collection by Id#
Endpoints#
DELETE /itemsvc/api/v1/nameduseritems/{id}Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedCompositeItem _id or _userItemId value. | Required |
Query parameters#
|Parameter | Type | Description | Required |
|transactional|Boolean|Set to true to make the request transactional.|Optional|
|nsfilter|String|namespace context|Required|
Response#
Response codes#
| Code | Description |
|---|---|
204 | No Content |
404 | Not Found |
Response data#
None
Edit NamedCompositeItem by Id#
Endpoints#
PUT /itemsvc/api/v1/nameduseritems/{id}Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedCompositeItem _id or _userItemId value. | Required |
Query parameters#
|Parameter | Type | Description | Required |
|transactional|Boolean|Set to true to make the request transactional.|Optional|
|nsfilter|String|namespace context|Required|
Body#
Only editable fields will be updated. Other fields if sent will be ignored. The editable fields are:
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Readable long-form name | Required |
_description | String | Describes the purpose of the NamedCompositeItem | Required |
_namespaces | String | An array of namespaces you want to add the NamedCompositeItem to | Required |
_userType | String | A user-defined type for the NamedCompositeItem that you can use to distinguish or group it by. | Required |
Body example#
{ "_name": "General Medical Architecture", "_description": "General Medical Architecture model with Doors view", "_namespaces": [ "ad5306af-0527-4e76-9432-5cd5ea8e1993" ], "_userType": "bim_model"}Response#
Response codes#
| Code | Description |
|---|---|
204 | No Content |
404 | File Not Found |
Response data#
None
Add existing NamedUserItems (NamedCompositeItem, NamedUserCollection, NamedFileCollection) as a related collection to a NamedCompositeItem#
For example composing elements collections, types collection, file collection into a model(composite item)
Endpoints#
POST /itemsvc/api/v1/nameduseritems/{id}/relatedcollectionsRequest#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedCompositeItem _id or _userItemId value. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
userItemVersionId | String | Pass the userItemVersionId to target a specific NamedCompositeItem version. | Optional |
transactional | String | Set to true to make the request transactional. | Optional |
nsfilter | String | namespace context | Required |
Body#
| Parameter | Type | Description | Required |
|---|---|---|---|
_itemId | String | The NamedUserItem's _id. | Required |
_userItemId | String | The NamedUserItem's _itemId or _userItemId. | Required |
_userItemVersionId | String | To target a specific version, pass the NamedUserItem version's id. | Optional |
Body example#
[ { "_itemId": "11_new_ba_elem_1sjwcciumd", "_userItemVersionId": "5cee80c1fa298d0d3e34e23b" }, { "_userItemId": "11_new_geom_view_4LeaYYWpsz" }]Response#
Response codes#
| Code | Description |
|---|---|
201 | Created |
400 | Bad Request |
Response data#
{ "_pageSize": 2, "_list": [ { "_itemId": "5cee7fee6505d6286dbca469", "_userItemId": "11_new_ba_elem_1sjwcciumd", "_userType": "rvt_elements", "_userItemVersion": 1, "_userItemVersionId": "5cee80c1fa298d0d3e34e23b", "_id": "5cefa9064fee68402c254f87", "_userItemClass": "NamedUserCollection", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559210246488, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559210246488 } }, { "_itemId": "5cee7fef6505d6286dbca46a", "_userItemId": "11_new_geom_view_4LeaYYWpsz", "_userType": "bim_model_geomviews", "_userItemVersion": 1, "_userItemVersionId": "5cee80c1fa298d0d3e34e23c", "_id": "5cefa9064fee68402c254f88", "_userItemClass": "NamedUserCollection", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559210246488, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559210246488 } } ], "_offset": 0, "_total": 2}Get RelatedCollections for a NamedCompositeItem#
Endpoints#
GET /itemsvc/api/v1/nameduseritems/:id/relatedcollections Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedCompositeItem _id or _userItemId value. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
query | String | To query the related collections, pass a simple query object with a key-value pair, such as ?query={"_userType":"bim_elem_types"}. | Required |
userItemVersionId | String | To delete a specific version, pass the RelatedItem's userItemVersionId. | Optional |
nsfilter | String | namespace context | Required |
Response#
Response codes#
| Code | Description |
|---|---|
200 | Accepted |
404 | File Not Found |
Response data example#
{ "_pageSize": 2, "_list": [ { "_itemId": "5cee7fee6505d6286dbca469", "_userItemId": "11_new_ba_elem_1sjwcciumd", "_userType": "rvt_elements", "_userItemVersion": 1, "_userItemVersionId": "5cee80c1fa298d0d3e34e23b", "_id": "5cefaa844fee68402c254f8b", "_userItemClass": "NamedUserCollection", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559210628719, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559210628719 } }, { "_itemId": "5cee7fef6505d6286dbca46a", "_userItemId": "11_new_geom_view_4LeaYYWpsz", "_userType": "bim_model_geomviews", "_userItemVersion": 1, "_userItemVersionId": "5cee80c1fa298d0d3e34e23c", "_id": "5cefaa844fee68402c254f8c", "_userItemClass": "NamedUserCollection", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559210628719, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559210628719 } } ], "_offset": 0, "_total": 2}Delete a relationship (RelatedCollection) between a NamedUserItem and NamedCompositeItem#
Endpoints#
DELETE /itemsvc/api/v1/nameduseritems/:id/relatedcollections/:relCollectionId Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedCompositeItem _id or _userItemId value. | Required |
relCollectionId | String | The Relationship id. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
userItemVersionId | String | Pass the userItemVersionId to target a specific NamedCompositeItem version. | Optional |
transactional | String | Set to true to make the request transactional. | Optional |
nsfilter | String | namespace context | Required |
Response#
Response codes#
| Code | Description |
|---|---|
204 | Success |
Response data#
None
Get NamedCompositeItem Update Logs#
Endpoints#
GET /itemsvc/api/v1/nameduseritems/{id}/updatelogsRequest#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the NamedUserCollection _id or _userItemId value. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
userItemVersionId | String | Pass the userItemVersionId to target a specific NamedCompositeItem version. | Optional |
nsfilter | String | namespace context | Required |
Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
404 | File Not Found |
Response data#
[ { "_updatedBy": "1b457660-92c2-461d-9895-78e731a031c6", "_updatedAt": 1542267364347 }]