Jump to content

entity IDs: shots and tasks

peter divers

Recommended Posts

Hello all I have an awful lot of questions here as this is my first ftrack api script with event listeners. So here goes below is what I currently have and is all working fine

import ftrack_api as ft
def ftrackListener(event):
    print 'event: ' + str(event)
    for entity in event['data'].get('entities',[]):
        if entity.get('entityType') == 'task' and entity['action'] == 'update':
            entityId = str(entity.get('entityId'))
            parentId = str(entity.get('parentId'))
            actionType = str(entity['action'])
            entityType = str(entity.get('entityType'))

            print 'entity: ' + str(entity)
            print 'entityType: ' + entityType
            print 'entityID: ' + entityId
            print 'parentID: ' + parentId
            print 'Action Type: ' + actionType

session = ft.Session(server_url='https://*******.ftrackapp.com', api_key='*********#######-0a580a5c1009',api_user='dev')


question one) entityId returns the entityId yet I can for the life of me figure out how to simply find the name of this task or is the entityId the status ? 

question two) What I am wanting to do is then change the status of the parent of this task which is a shot, Ive seen a lot of posts around but im getting rather confused as to the new and old Api?

question three) Lastly status Id,s what is the usual way people are going about finding the actual value or name of this as my current way would be to make a dictionary out of it in a rather manual process,


I know their is quite a lot here and any hints on any of it would be fantastic 



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...