Create or Update an aspect type

PUT {{baseUrl}}/aspecttypes/:id?includeShared=false

Create or Update an aspect type. Only adding variables and restricted updates on variables is supported, like user can change unit details, can increase the length of a static STRING variable but length of a dynamic STRING variable cannot be changed. In order to rename or remove variable, use PATCH /aspecttypes/{id}/variables api. Default value field is available only for static aspect variables and not on dynamic aspect variable. Aspect type description should not contain single quote character.

Request Params

KeyDatatypeRequiredDescription
includeSharedbooleanSpecifies if the operation should take into account shared (received) assets, aspects and asset types. Received resources are not visible in case includeShared=false. For query operations, received resources are not returned. Endpoints addressing individual resources respond with 404. In case received resources are referenced in a request parameter or property, they are treated as not existing.

Request Body

{"name"=>"<string>", "category"=>"<string>", "scope"=>"private", "variables"=>["<object>"], "description"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
If-MatchstringLast known version to facilitate optimistic locking.
*Required for modification.
If-None-MatchstringSet ifNoneMatch header to "*" for ensuring create request
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;name&quot;:&quot;engine&quot;,&quot;category&quot;:&quot;\u003cstring\u003e&quot;,&quot;scope&quot;:&quot;private&quot;,&quot;variables&quot;:[{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}],&quot;description&quot;:&quot;The engine of the Millenium Falcon&quot;,&quot;id&quot;:&quot;mdsp.wing&quot;,&quot;tenantId&quot;:&quot;mdsp&quot;,&quot;etag&quot;:1,&quot;sharing&quot;:{&quot;modes&quot;:[&quot;SHARER&quot;,&quot;SHARER&quot;]},&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}}}