TDArlt Posted November 21, 2019 Report Share Posted November 21, 2019 Hi there, I'm currently integrating ftrack into some existing processes on our side. One step is that a client can use a web-interface from us where she/he may set some things approved/unapproved. I'd like to get a direct feedback of this one to an internally referenced task in ftrack. So, there is a update call that looks like that: { action: update entity_type: Task entity_key: [ #ID OF THE TASK# ] entity_data: { status: { __entity_type__: Status id: #ID OF THE STATUS I LIKE TO SET# } } } I get the response "Cannot set relationship to string value." (value error). Updating other things (like name, etc.) works (as I set the string directly), but it won't let me update the status. So, what am I doing wrong here? Thanks in advance! Chris Link to comment Share on other sites More sharing options...
Lucas Correia Posted November 29, 2019 Report Share Posted November 29, 2019 The Python API Client often uses relationships (e.g. status) to update entities, but when using the raw API backend or the JS API client I recommend that you instead the relationship key attributes instead. In this case, that would be `status_id`. A more complete example of a request body would be: [ { "action": "update", "entity_type": "Task", "entity_key": [ "12bd29be-72b0-11e7-96a7-0a580ae40a16" ], "entity_data": { "status_id": "44dd9fb2-4164-11df-9218-0019bb4983d8", "__entity_type__": "Task" } } ] Regards, Lucas TDArlt 1 Link to comment Share on other sites More sharing options...
TDArlt Posted December 2, 2019 Author Report Share Posted December 2, 2019 Thanks, Lucas! It seems like I did not try this, although it totally makes sense - and works perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now