vitek Posted June 21, 2018 Report Share Posted June 21, 2018 Hello, I am trying to use dedicated API key, however I'd like to make publish look like it was done by a specific user. What's the best way of doing so? Thanks in advance! Cheers. Vit Link to comment Share on other sites More sharing options...
Remus Avram Posted June 25, 2018 Report Share Posted June 25, 2018 Hi @vitek you can set the specific user to the "published by" attribute in the "Info" tab. I didn't find a way to change it in the "Activities" tab. Why are you using a dedicated API key for publishing? Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted June 26, 2018 Report Share Posted June 26, 2018 When you create the AssetVersion from the API you should be able to set the 'user_id' to another user: version = session.create('AssetVersion', {'asset_id': asset_id, 'user_id': another_user_id}) Link to comment Share on other sites More sharing options...
vitek Posted July 2, 2018 Author Report Share Posted July 2, 2018 @Mattias: Many thanks! @Remus: Original idea was just to simplify things - It takes care of making publish look like coming from the same username, which is logged on your system and you don't have to get the user API keys... if the system user and ftrack user names are matching ofcourse, so changing the name of the publish is hopefully just temporary patch Link to comment Share on other sites More sharing options...
jen_at_haverstack Posted October 15, 2019 Report Share Posted October 15, 2019 Sorry to revive an old thread, but is there any way to change the user for the Activity also? The change suggested by @Mattias Lagergren definitely changes the "Published By" property, but the Activities tab for the Asset Version still shows "<api user> published..." instead of the user I specify in the `user_id`. Link to comment Share on other sites More sharing options...
Guest Posted October 22, 2019 Report Share Posted October 22, 2019 Hi Jen, You'll want to find the Event object which was created in response to the publish and change the user_id. Unlike the info panel, the activity feed didn't seem to refresh automatically for me, so make sure to reload the page when you make your change. event = session.query( 'Event where action is "asset.published"' ' and parent_id is "{}"'.format( asset_version['id']) ).one() event['user_id'] = cool_user['id'] session.commit() Link to comment Share on other sites More sharing options...
jen_at_haverstack Posted October 22, 2019 Report Share Posted October 22, 2019 That works! I guess I would have preferred to set the user on the event before it's created, but this is fine also. Thanks! 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