API Method to Set Custom Attribute

API Method to Set Custom Attribute

imckenzieY7CGY
Advocate Advocate
83 Views
0 Replies
Message 1 of 1

API Method to Set Custom Attribute

imckenzieY7CGY
Advocate
Advocate

Looking for confirmation on the correct sequence of API calls to set a custom attribute on an item. For example, I have an item with partVersionID 47351886 and a custom attribute "Revision Category" with id 1165 which is a picklist attribute and I want to set it to a new value (which has to be one of the valid values from the picklist). 

 

So I think I need:

  • Determine the list of valid attribute values per the picklist
    • Can't see an API method to get this, but I could retrieve this manually and assume it doesn't change
  • Determine the current value of the attribute on the item
    • This endpoint appears to return that information: /api/item/v1/partVersion/47351886
  • Set the attribute to a new value..
    • I haven't tested it, but I'm guessing /api/item/v1/attribute/1165
    • Does the item to target get controlled by the body of that request? So do I essentially send back the output of /api/item/v1/partVersion/47351886 with the value of the attribute updated?
      • Update - this didn't work, returned Error 500, so I'm missing something
0 Likes
84 Views
0 Replies
  • API
Replies (0)