Create or Update an asset type

PUT {{baseUrl}}/assettypes/:id?exploded=<boolean>&includeShared=false

Create or Update an asset type. Complete asset type model payload should be provided in request.

Following are the updates allowed

  • Asset type description can be updated.
  • Asset type variable's can be created, updated and removed. Varaible length, default Value and Unit can be changed. The unit changes from the API does not compute any value changes derived after the unit changes, the values will remain as it is and only the unit will be updated. The length can only be increased of a string variable and it cannot be decreased.
  • File assignments can be updated and removed.

  • Aspects can be created, updated and removed, please refer sample payloads below

    • Create aspect { name: leftWing, aspectTypeId: mdsp.wing }
    • Update aspect aspectId should be provided in payload (only name can be updated) { name: rightWing, aspectId: b9cbfc7073be4530887cdb1e71c932b8, aspectTypeId: mdsp.wing }
    • To delete an aspect, aspect should not be part of aspects payload

Request Params

KeyDatatypeRequiredDescription
explodedstringSpecifies if the asset type should include all of it's inherited variables and aspects. Default is false.
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.

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;X_Wing&quot;,&quot;parentTypeId&quot;:&quot;mdsp.spaceship&quot;,&quot;description&quot;:&quot;Hyperspace jump capable space ship&quot;,&quot;instantiable&quot;:true,&quot;scope&quot;:&quot;private&quot;,&quot;id&quot;:&quot;mdsp.spaceship&quot;,&quot;tenantId&quot;:&quot;mdsp&quot;,&quot;etag&quot;:1,&quot;aspects&quot;:[{&quot;name&quot;:&quot;leftWing&quot;,&quot;aspectId&quot;:&quot;b9cbfc7073be4530887cdb1e71c932b8&quot;,&quot;aspectType&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;_links&quot;:{&quot;origin&quot;:{&quot;href&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}}},{&quot;name&quot;:&quot;leftWing&quot;,&quot;aspectId&quot;:&quot;b9cbfc7073be4530887cdb1e71c932b8&quot;,&quot;aspectType&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;_links&quot;:{&quot;origin&quot;:{&quot;href&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}}}],&quot;variables&quot;:[{&quot;_links&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},{&quot;_links&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}],&quot;fileAssignments&quot;:[{&quot;_links&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},{&quot;_links&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}],&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;}},&quot;parent&quot;:{&quot;href&quot;:&quot;http://CnBnkoISAXrtPidXrDHcMRWnXWUnud.uhznlvqOGc8AnA&quot;}}}