User Configs
Create User Configs#
Endpoints#
POST /itemsvc/api/v1/nameduseritemsRequest#
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
transactional | String | Set to true to make the request transactional. | Optional |
Body parameters#
| 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 UserConfig | Required |
_namespaces | String | An array of namespaces you want to add the UserConfig to | Required |
_userType | String | A user-defined type for the UserConfig that you can use to distinguish or group it by. | Required |
_itemClass | String | Enter "UserConfig". | Required |
_version._userData | Object | UserConfig data. | Required |
Request body example#
[ { "_name": "General Medical Architecture", "custom_field": "General Medical Architecture", "_shortName": "genmedarch", "_description": "General Medical Architecture model with Doors view", "_userType": "upload_script", "_namespaces": [ "lntpurelocal_Xw6AQru7" ], "_itemClass": "UserConfig", "_version": { "_userData": { "settings": { "detailPath": "/detail" } } } }]Response#
Response codes#
| Code | Description |
|---|---|
201 | Created |
400 | Bad Request |
Response body example#
{ "_pageSize": 1, "_list": [ { "_uri": "/nameduseritems/5cf129f3213fc97f7dbf24fb", "_name": "General Medical Architecture", "_userType": "upload_script", "_tipId": "5cf129f3213fc97f7dbf24fc", "_versions": [ { "_userItemDbId": "5cf129f3213fc97f7dbf24fb", "_id": "5cf129f3213fc97f7dbf24fc", "_isTip": true, "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559308787506, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559308787506 }, "_version": 1, "_userData": { "settings": { "detailPath": "/detail" } } } ], "_irn": "itemsvc:nameduseritem:5cf129f3213fc97f7dbf24fb", "_namespaces": [ "lntpurelocal_Xw6AQru7" ], "_nextVersion": 2, "_shortName": "genmedarch", "_tipVersion": 1, "_versionsCount": 1, "_itemClass": "UserConfig", "_userItemId": "genmedarch_mcMyQeve3u", "_id": "5cf129f3213fc97f7dbf24fb", "_description": "General Medical Architecture model with Doors view", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559308787466, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559308787466 }, "_kind": "userconfig" } ], "_offset": 0, "_total": 1}Get UserConfig by Id#
Endpoints#
GET /itemsvc/api/v1/nameduseritems/{id}Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | The UserConfig's id. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
project | Object | Field projections to exclude or include fields in the response, for example, project={"_metadata":0} or project={"_versions._userData":1}. | Optional |
Note: The
_versionsarray always contains current version only. To get all the versions for a named user item useGET /nameduseritems/{id}/versionsorGET /nameduseritemswith the_versions.alloption.
Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
404 | File Not Found |
Response body example#
{ "_uri": "/nameduseritems/5cf129f3213fc97f7dbf24fb", "_tipVersion": 1, "_itemClass": "UserConfig", "_userItemId": "genmedarch_mcMyQeve3u", "_tipId": "5cf129f3213fc97f7dbf24fc", "_versions": [ { "_userItemDbId": "5cf129f3213fc97f7dbf24fb", "_id": "5cf129f3213fc97f7dbf24fc", "_userData": { "settings": { "detailPath": "/detail" } } } ], "_irn": "itemsvc:nameduseritem:5cf129f3213fc97f7dbf24fb", "_id": "5cf129f3213fc97f7dbf24fb", "_kind": "userconfig"}Get User Configs 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 UserConfig class. You can also use query operators. To query all versions of the UserConfig 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 |
Query examples#
# searches by name, the response would have tip version only:?query={"_name": "General Medical Architecture Script"}
# searches by item class, has all the versions?query={"_itemClass": "Script","_versions.all":true}
# searches against all the versions and returns all the versions matching?query={"$and": [{"_itemClass": "Script"},{"_versions._userAttributes.key":"value"}],"_versions.all":true}
# searches against latest version?query={"$and": [{"_itemClass": "Script"},{"_versions._userAttributes.key":"value":"value"}]} Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
Response body example#
{ "_pageSize": 1, "_list": [ { "_uri": "/nameduseritems/5cf129f3213fc97f7dbf24fb", "_name": "General Medical Architecture", "_userType": "upload_script", "_tipId": "5cf12ac9213fc97f7dbf24fd", "_versions": [ { "_userItemDbId": "5cf129f3213fc97f7dbf24fb", "_id": "5cf129f3213fc97f7dbf24fc", "_isTip": false, "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559308787506, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559309001301 }, "_version": 1, "_userData": { "settings": { "detailPath": "/detail" } } }, { "_userItemDbId": "5cf129f3213fc97f7dbf24fb", "_id": "5cf12ac9213fc97f7dbf24fd", "_isTip": true, "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559309001292, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559309001303 }, "_version": 2, "_userData": { "accountid": 4, "modelid": 6, "file_name": "General Medical Architecture.bimpk", "projectid": 5 } } ], "_irn": "itemsvc:nameduseritem:5cf129f3213fc97f7dbf24fb", "_namespaces": [ "lntpurelocal_Xw6AQru7" ], "_nextVersion": 3, "_shortName": "genmedarch", "_tipVersion": 2, "_versionsCount": 2, "_itemClass": "UserConfig", "_userItemId": "genmedarch_mcMyQeve3u", "_id": "5cf129f3213fc97f7dbf24fb", "_description": "General Medical Architecture model with Doors view", "_metadata": { "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_createdAt": 1559308787466, "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c", "_updatedAt": 1559309001296 }, "_kind": "userconfig" } ], "_offset": 0, "_total": 1}Delete User Config by Id#
Endpoints#
DELETE /itemsvc/api/v1/nameduseritems/{id}Request#
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | The Script's _userItemId | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
transactional | Boolean | Set to true to make the request transactional. | Required |
Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
404 | File Not Found |
Response body example#
[ { "_updatedBy": "1b457660-92c2-461d-9895-78e731a031c6", "_updatedAt": 1542267364347 }]