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
Key | Datatype | Required | Description |
---|---|---|---|
includeShared | boolean | Specifies 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
Key | Datatype | Required | Description |
---|---|---|---|
If-Match | string | Last known version to facilitate optimistic locking. | |
*Required for modification. | |||
If-None-Match | string | Set ifNoneMatch header to "*" for ensuring create request | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"name":"engine","category":"\u003cstring\u003e","scope":"private","variables":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"description":"The engine of the Millenium Falcon","id":"mdsp.wing","tenantId":"mdsp","etag":1,"sharing":{"modes":["SHARER","SHARER"]},"_links":{"self":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}}}