Request

Response

    Mutations

    setProperties

    mutation

    Sets properties of a given target.

    Note: This bulk mutation has a max input size limit of 30.

    Template for Mutation:

    mutation SetProperties($input: setPropertiesInput!){
      setProperties(input: $input) {
        # SetPropertiesPayload Fields
      }
    }
    

    Arguments

    input*The inputs needed to set a property.
    * Required

    Possible Returns

    Value TypeDescription
    SetPropertiesPayload Return payload on set properties operation.


    Examples

    Example 1

    This mutation updates the values of Properties on the given Extendable that share the same PropertyDefinition.

    Query:

     mutation SetStandardProperties($input: SetPropertiesInput!) {
           setProperties(input: $input) {
               targetId
               properties {
                   value
                   displayValue
                   definition {
                       id
                       name
                       specification
                       isHidden
                       isReadOnly
                       isArchived
                       description
                       propertyBehavior
                       units {
                           id
                           name
                       }
                   }
               }
           }
    }
    
    Show More

    Query Variables:

    {
       "input": {
           "targetId" : "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
           "propertyInputs": [
               {
                   "propertyDefinitionId" : "cHJvcGRlZn5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5wcm9wX2RlZl9jb2xfMTc2ODg4MjUxNzkxOH5wYXJhbWV0ZXJzLkFDTjRFdmRITE1UWml3N25ma0hVcFBqc0E0VmZaYW5UOjVkOGRmOTEzZjQwMjRjZmFhZGE0MGZkMjcxMjJmNGQxLTEuMC4w",
                   "value": "Green"
               }
           ]
       }
    }
    
    Show More

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
               "properties": [
                   {
                       "value": "Green",
                       "displayValue": "Green",
                       "definition": {
                           "id": "cHJvcGRlZn5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5wcm9wX2RlZl9jb2xfMTc2ODg4MjUxNzkxOH5wYXJhbWV0ZXJzLkFDTjRFdmRITE1UWml3N25ma0hVcFBqc0E0VmZaYW5UOjVkOGRmOTEzZjQwMjRjZmFhZGE0MGZkMjcxMjJmNGQxLTEuMC4w",
                           "name": "Background Color 1768897661542",
                           "specification": "STRING",
                           "isHidden": false,
                           "isReadOnly": false,
                           "isArchived": false,
                           "description": "bg color",
                           "propertyBehavior": "STANDARD",
                           "units": null
                       }
                   }
               ]
           }
       }
    }
    
    Show More

    Example 2

    This mutation updates values for the given PropertyDefinitions of ‘TIMELESS’ and ‘STANDARD’ behavior on the given componentId.

    Query:

     mutation SetTimelessProperties($input: SetPropertiesInput!) {
           setProperties(input: $input) {
               targetId
               properties {
                   value
               }
           }
    }
    
    Show More

    Query Variables:

    {
       "input": {
           "targetId" : "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
           "propertyInputs": [{
                   "propertyDefinitionId" : "cHJvcGRlZn5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5wcm9wX2RlZl9jb2xfMTc2ODg4MjUxNzkxOH5wYXJhbWV0ZXJzLkFDTjRFdmRITE1UWml3N25ma0hVcFBqc0E0VmZaYW5UOjE3ODYyYzU4NDdmMTRlNzNhNzVlZjU4M2ZjNzdkYTI1LTEuMC4w",
                   "value": "White"
               }
           ]
       }
    }
    
    Show More

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
               "properties": [
                   {
                       "value": "White"
                   }
               ]
           }
       }
    }
    
    Show More

    Example 3

    Overrides the time at which a BOM relation resolves its child component by setting the component resolution property on the BOM relation. Supported values: 0 (FOLLOW_CAD), 1 (LATEST_CHANGE), 2 (LATEST_VERSION), 3 (LATEST_REVISION). This example sets it to 2 (LATEST_VERSION).

    Query:

     mutation SetComponentResolution($input: SetPropertiesInput!) {
     setProperties(input: $input) {
       targetId
       properties {
         name
         value
         displayValue
         definition {
           id
           name
         }
       }
     }
    }
    
    Show More

    Query Variables:

    {
     "input": {
       "targetId": "Ym9tcmVsYXRpb25-OWFiTWNGeEtnaFB5Y3d1TW9hR05pa19MMkN-TEtIRmVPRkk0Vk9NMU1DU2hrNDgzQg",
       "propertyInputs": [
         {
           "propertyDefinitionId": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflNXNTBjbWx1YzJsalVISnZjR1Z5ZEdsbGMwZHliM1Z3VTNSbn5SMlZ1WlhKaGJBfnBhcmFtZXRlcnMuUW1GelpWQnliM0JsY25ScFpYTlRkR0ZuYVc1bjozNWM2OGFiMzFlNjk0MTAyOTNiODViNDQ4YjYwNDgzNi0xLjAuMA",
           "value": 2
         }
       ]
     }
    }
    
    Show More

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "Ym9tcmVsYXRpb25-OWFiTWNGeEtnaFB5Y3d1TW9hR05pa19MMkN-TEtIRmVPRkk0Vk9NMU1DU2hrNDgzQg",
               "properties": [
                   {
                       "name": "Component Resolution",
                       "value": 2,
                       "displayValue": "2",
                       "definition": {
                           "id": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflNXNTBjbWx1YzJsalVISnZjR1Z5ZEdsbGMwZHliM1Z3VTNSbn5SMlZ1WlhKaGJBfnBhcmFtZXRlcnMuUW1GelpWQnliM0JsY25ScFpYTlRkR0ZuYVc1bjozNWM2OGFiMzFlNjk0MTAyOTNiODViNDQ4YjYwNDgzNi0xLjAuMA",
                           "name": "Component Resolution"
                       }
                   }
               ]
           }
       }
    }
    
    Show More

    Example 4

    This mutation clears values for the given PropertyDefinitions on the given targetIds.

    Query:

     mutation ClearProperties($input: SetPropertiesInput!) {
           setProperties(input: $input) {
               targetId
               properties {
                   value
               }
           }
    }
    
    Show More

    Query Variables:

    {
       "input": {
           "targetId" : "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
           "propertyInputs": [
               {
                   "propertyDefinitionId" : "cHJvcGRlZn5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5wcm9wX2RlZl9jb2xfMTc2ODg4MjUxNzkxOH5wYXJhbWV0ZXJzLkFDTjRFdmRITE1UWml3N25ma0hVcFBqc0E0VmZaYW5UOjVkOGRmOTEzZjQwMjRjZmFhZGE0MGZkMjcxMjJmNGQxLTEuMC4w"
               }
           ]
       }
    }
    
    Show More

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
               "properties": [
                   {
                       "value": null
                   }
               ]
           }
       }
    }
    
    Show More

    Example 5

    Sets the BOM Structure Type property on a component to control visibility in BOM views. Use value 2 for HIDDEN_CHILDREN, 0 for DEFAULT.

    Query:

     mutation SetBomStructureTypeProperty($input: SetPropertiesInput!) {
     setProperties(input: $input) {
       targetId
       properties {
         name
         value
         displayValue
         definition {
           id
           name
           propertyBehavior
         }
       }
     }
    }
    
    Show More

    Query Variables:

    {
     "input": {
       "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35ZVTNrUXp0eWRWQTdTY2NCTklrZGtmX2FnYQ",
       "propertyInputs": [
         {
           "propertyDefinitionId": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflNXNTBjbWx1YzJsalVISnZjR1Z5ZEdsbGMwZHliM1Z3VTNSbn5SMlZ1WlhKaGJBfnBhcmFtZXRlcnMuUW1GelpWQnliM0JsY25ScFpYTlRkR0ZuYVc1bjo1N2VmZWNjMWYxODE0YjRkYjQwZmMxZjZhZWE0ZWVlYi0xLjAuMA",
           "value": 2
         }
       ]
     }
    
    Show More

    } }

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35ZVTNrUXp0eWRWQTdTY2NCTklrZGtmX2FnYQ",
               "properties": [
                   {
                       "name": "BOM Structure Type",
                       "value": 2,
                       "displayValue": "2",
                       "definition": {
                           "id": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflNXNTBjbWx1YzJsalVISnZjR1Z5ZEdsbGMwZHliM1Z3VTNSbn5SMlZ1WlhKaGJBfnBhcmFtZXRlcnMuUW1GelpWQnliM0JsY25ScFpYTlRkR0ZuYVc1bjo1N2VmZWNjMWYxODE0YjRkYjQwZmMxZjZhZWE0ZWVlYi0xLjAuMA",
                           "name": "BOM Structure Type",
                           "propertyBehavior": "STANDARD"
                       }
                   }
               ]
           }
       }
    }
    
    Show More

    Example 6

    Set base properties of given component.

    Query:

     mutation SetBaseProperties($input: SetPropertiesInput!) {
       setProperties(input: $input) {
           targetId
           properties {
               value
               displayValue
               definition {
                   name
                   propertyBehavior
               }
           }
       }
    }
    
    Show More

    Query Variables:

    {
       "input": {
           "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
           "propertyInputs": [
               {
                   "value": "Autodesk",
                   "propertyDefinitionId": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflFtRnpaVkJ5YjNCbGNuUnBaWE5IY205MWNGTjBZV2RwYm1jflEyOXRjRzl1Wlc1MH5wYXJhbWV0ZXJzLlFtRnpaVkJ5YjNCbGNuUnBaWE5UZEdGbmFXNW46ZTM1NDM5ZTJlMDI0NDhjYTgyNWQ0MTI4MTY4NDJlY2ItMS4wLjA"
               }
           ]
       }
    }
    
    Show More

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
               "properties": [
                   {
                       "value": "Autodesk",
                       "displayValue": "Autodesk",
                       "definition": {
                           "name": "Manufacturer",
                           "propertyBehavior": "STANDARD"
                       }
                   }
               ]
           }
       }
    }
    
    Show More

    Example 7

    Set physical properties of given component.

    Query:

     mutation SetPhysicalProperties($input: SetPropertiesInput!) {
       setProperties(input: $input) {
           targetId
           properties {
               value
               displayValue
               definition {
                   name
                   propertyBehavior
               }
           }
       }
    }
    
    Show More

    Query Variables:

    {
       "input": {
           "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
           "propertyInputs": [
               {
                   "value": 10,
                   "propertyDefinitionId": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflEyOXRjSFYwWldSUWNtOXdaWEowZVVSbFpuTkhjbTkxY0ZOMFp3flVHaDVjMmxqWVd3fnBhcmFtZXRlcnMuUW1GelpWQnliM0JsY25ScFpYTlRkR0ZuYVc1bjoxMGM0YzhjNWUwYTE0NzNlYTI4NzMzODY3MmIzNGJlZi0xLjAuMA"
               },
               {
                   "value": 20,
                   "propertyDefinitionId": "cHJvcGRlZn5RbUZ6WlZCeWIzQmxjblJwWlhOVGRHRm5hVzVuflEyOXRjSFYwWldSUWNtOXdaWEowZVVSbFpuTkhjbTkxY0ZOMFp3flVHaDVjMmxqWVd3fnBhcmFtZXRlcnMuUW1GelpWQnliM0JsY25ScFpYTlRkR0ZuYVc1bjplY2VlMjU0OWRiMmU0MTUxYmVkYmMwYmJlNjQxNDE3YS0xLjAuMA"
               }
           ]
       }
    }
    
    Show More

    Response:

    {
       "data": {
           "setProperties": {
               "targetId": "cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
               "properties": [
                   {
                       "value": 10,
                       "displayValue": "10",
                       "definition": {
                           "name": "Mass",
                           "propertyBehavior": "STANDARD"
                       }
                   },
                   {
                       "value": 20,
                       "displayValue": "20",
                       "definition": {
                           "name": "Area",
                           "propertyBehavior": "STANDARD"
                       }
                   }
               ]
           }
       }
    }
    
    Show More