Skip to main content
Version: v4.6

User Configs

Create User Configs#

Endpoints#

POST /itemsvc/api/v1/nameduseritems

Request#

Query parameters#

ParameterTypeDescriptionRequired
transactionalStringSet to true to make the request transactional.Optional

Body parameters#

ParameterTypeDescriptionRequired
_nameStringReadable long-form nameRequired
_shortNameStringAn abbreviated name up to 22 characters that is used for referenceRequired
_descriptionStringDescribes the purpose of the UserConfigRequired
_namespacesStringAn array of namespaces you want to add the UserConfig toRequired
_userTypeStringA user-defined type for the UserConfig that you can use to distinguish or group it by.Required
_itemClassStringEnter "UserConfig".Required
_version._userDataObjectUserConfig 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#

CodeDescription
201Created
400Bad 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#

ParameterTypeDescriptionRequired
idStringThe UserConfig's id.Required

Query parameters#

ParameterTypeDescriptionRequired
projectObjectField projections to exclude or include fields in the response, for example, project={"_metadata":0} or project={"_versions._userData":1}.Optional

Note: The _versions array always contains current version only. To get all the versions for a named user item use GET /nameduseritems/{id}/versions or GET /nameduseritems with the _versions.all option.

Response#

Response codes#

CodeDescription
200Success
404File 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/nameduseritems

Request#

Query parameters#

ParameterTypeDescriptionRequired
queryObjectPass 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
projectObjectField projections to exclude or include fields in the response, for example, project={"_metadata":0}.Optional
pageObjectPass a Page object that defines the response pagination, for example, ?page={"_offset": 0, "_pageSize" 100}Optional
sortObjectPass 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#

CodeDescription
200Success
400Bad 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#

ParameterTypeDescriptionRequired
idStringThe Script's _userItemIdRequired

Query parameters#

ParameterTypeDescriptionRequired
transactionalBooleanSet to true to make the request transactional.Required

Response#

Response codes#

CodeDescription
200Success
404File Not Found

Response body example#

[  {    "_updatedBy": "1b457660-92c2-461d-9895-78e731a031c6",    "_updatedAt": 1542267364347  }]