Jump to content

Search the Community

Showing results for tags 'API'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Company news
    • General announcements
  • ftrack Studio (main app)
    • General discussion
    • Feature requests
    • API
    • Help
    • Actions and Widgets
    • ftrack Go
  • ftrack Review
    • General discussion
    • Feature requests
    • Help
  • Connect and Integrations
    • Releases
    • General discussion
    • Feature requests
    • Early Access Integrations & Connect
    • Help
  • Advisory Forum
  • Tech preview
    • API


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL



Found 17 results

  1. Hello, quick question regarding notes. I want to create one via your API in Markdown format. I have tried with something like this: data =""" HEADING ========= * List * sublist """ project.create_note(data, my_user) But it's not being displayed properly ( plain text not in markdown). How a note created through this method should look like to in order to be displayed correctly?
  2. Hey yall! I was looking for a way to create a folder on our server based on a task that has been created in Ftrack. I saw the Folder creation action but can't find any good documentation on that or anything. Has anyone done this with success? Thanks so much! Jason
  3. Is there a method to set a user's account password using the API? I'm scripting a user account creation process and this is the one aspect I haven't managed to figure out. Looking at the schemas, there's no property that looks like it would do it. Sending an invitation email seems like the best route but it's not our current manual method and I'd rather not change it if possible. I'm working with the rest api endpoint using powershell if that's relevant. I don't believe it leaves me without any features of the api clients.
  4. I am trying to create a new Calendar Event using the api, but I think this is not currently being supported. The old api had a project.createPhase() method which is the one I am testing to create this entity. Is this the correct way to approach the creation of events through the api? FYI: I am currently using the 3.5 (latest) ftrack api for python.
  5. It's my understanding that using the following code should always return the same metadata entity: const metadata = await session.ensure( 'Metadata', {parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", key: "builds", parent_type: "Breakdown"} ); If the entity did not exist before, `session.ensure` would create it, and if it did exist it would simply return the existing entity. Instead, if the entity already exists this will throw a Duplicate Entry error.
  6. If I do something like this: const metadataResult = await session.create( 'Metadata', {parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", key: "builds", parent_type: "Breakdown", value: "foo"} ); ...the contents of `metadataResult` will be: { action: "create", data: { __entity_type__: "Metadata", key: "builds", parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", parent_type: "Milestone", value: "foo" } } Notice how the `parent_type` key is listed as `Milestone` when it should be `Breakdown`. For further context, `Breakdown` is a custom object created via the Objects interface and it has the 'Status' box checked.
  7. Recently I was attempting to create a Folder object via the JavaScript API and encountered this error: Permission denied: not allowed to 'create' 'Task'. Missing the required 'Create objects (sequence,shot,task)' permission. I was providing the `name`, `parent_id`, `object_type_id` during my attempt, and the given error was very strange to me because my user should have administrator permissions for the project I was modifying. After a while I realized that I needed to also provide the `project_id` so that the API could figure out whether I had the appropriate permissions to make this change. Still, if the `project_id` is required to determine permissions, it would have been more useful if the error message specifically called that out instead of sending me down a rabbit hole of checking my permissions and API keys.
  8. Hello! I'm currently reading documentation on the API/Event listeners, my goal being to have an event listener watch for the first activity on a shot (Whenever the shot is marked 'In Progress') and automatically populate the start date accordingly. I'd like to achieve this so our schedule/overview can be automatically populated, with the end date being auto-populated by the bid hours. My question is, once I figure out the way to do it, will it be populated retroactively? When I run the action will it populate all the start dates that aren't already populated? If not, is this possible to do through the API? Thank you, -Phil F
  9. I'm wondering how to mute this kind of feed from the ftrack session: 2019-07-17 11:37:48,561 DEBUG Checking for entity in cache with key ('Status', ['a0bc2444-15e2-11e1-b21a-0019bb4983d8']) "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:967" 2019-07-17 11:37:48,561 DEBUG Retrieved existing entity from cache: <Status(a0bc2444-15e2-11e1-b21a-0019bb4983d8)> at 582088240 "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:974" 2019-07-17 11:37:48,561 DEBUG Cache not updated with merged entity as no differences detected. "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:998" 2019-07-17 11:37:48,561 DEBUG Merging potential new data into attached entity for attribute task_status. "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\attribute.py:36" 2019-07-17 11:37:48,561 DEBUG Merging remote value for attribute <ftrack_api.attribute.ReferenceAttribute(task_status) object at 571977800>. "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\attribute.py:73" 2019-07-17 11:37:48,561 DEBUG Merging entity into session: <Status(a0bc3f24-15e2-11e1-b21a-0019bb4983d8)> at 582088408 "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:852" 2019-07-17 11:37:48,561 DEBUG Entity not already processed for key ('Status', ['a0bc3f24-15e2-11e1-b21a-0019bb4983d8']). "C:\Users\tmiko\AppData\Roaming\Python\Python27\site-packages\ftrack_api\session.py:962" What's odd to me is that i don't get it when i just run command line tests. I do get it when i'm running from my custom pyside GUIs. I'm guessing i just set something somewhere that i'm not aware of.
  10. Hey folks, since yesterday I get the following error when trying to connect to the ftrack_api. // ftrack_api.session.Session : Calling server https://[OUR_FTRACK_SITE]/api with '[{"action": "query_server_information"}]' // // ftrack_api.session.Session : Call took: 0.113607 // // ftrack_api.session.Session : Response: u'[{"storage_scenario": {"data": {}, "scenario": "ftrack.automatic"}, "schema_hash": "450f452f8addcd23370a8a90f8156c4a", "version": "", "is_timezone_support_enabled": false}]' // // Error: ftrack_api.session.Session : Server reported error in unexpected format. Raw error was: [{"storage_scenario": {"data": {}, "scenario": "ftrack.automatic"}, "schema_hash": "450f452f8addcd23370a8a90f8156c4a", "version": "", "is_timezone_support_enabled": false}] // # Traceback (most recent call last): # File "/prod/softprod/apps/maya/2018/linux/lib/python27.zip/logging/__init__.py", line 853, in emit # msg = self.format(record) # File "/prod/softprod/apps/maya/2018/linux/lib/python27.zip/logging/__init__.py", line 726, in format # return fmt.format(record) # File "/users_roaming/tdorfmeister/devel/ppStudio/common/libs/filmmore/logger.py", line 48, in format # logline = super(self.__class__, self).format(record) # File "/prod/softprod/apps/maya/2018/linux/lib/python27.zip/logging/__init__.py", line 465, in format # record.message = record.getMessage() # File "/prod/softprod/apps/maya/2018/linux/lib/python27.zip/logging/__init__.py", line 325, in getMessage # msg = str(self.msg) # File "/prod/softprod/libs/ftrack_api/exception.py", line 42, in __str__ # return str(self.message.format(**keys)) # KeyError: '"storage_scenario"' I'm just trying to connect using `ftrack_api.Session()` with my credentials and `auto_connect_event_hub=True`. Any help is much appreciated, since I really have no clue how to figure this one out on my own. Thanks PS: I should note that my api is on v1.3.3. I know... 😕
  11. <ftrack_api.query.QueryResult object at 0x0000024562AC9CF8> # Error: ftrack_api.session.Session : Server reported error: ValueError(Cannot set relationship to string value.) # # Error: Server reported error: ValueError(Cannot set relationship to string value.) # Traceback (most recent call last): # File "<maya console>", line 1, in <module> # File "R:/Pipeline/configs/assetPipeline\assetAPI.py", line 430, in publishComponent # self.set_component(oVersion, filePath) # File "R:/Pipeline/configs/assetPipeline\assetAPI.py", line 420, in set_component # self.session.commit() # File "R:/Pipeline/APIs/ftrackAPI\ftrack_api\session.py", line 1241, in commit # result = self._call(batch) # File "R:/Pipeline/APIs/ftrackAPI\ftrack_api\session.py", line 1620, in _call # raise ftrack_api.exception.ServerError(error_message) # ServerError: Server reported error: ValueError(Cannot set relationship to string value.) # MY CODE def set_component(self, asset_version, filePath): logger.info("Publishing Component %s ---------------------------------" % filePath) location = self.session.query('Location where name is "ftrack.unmanaged"').one() # This is important # location = self.session.query('Location where name is "{}"'.format("ftrack.unmanaged")).one() print asset_version print "FilePath: %s" % filePath print "Location: " print location ft_component = asset_version.create_component(path=filePath, location=location) self.session.commit() if ft_component: logger.info("Publishing Component Succesful %s ---------------------------------" % ft_component) return ft_component def publishComponent(self, sAsset, componentType, filePath, sTaskType="Rigging",iVersionNumber=1): oVersion = self.build_asset_version(sAsset, sTaskType,iVersionNumber) print oVersion.keys() if componentType in ["model", "rig"]: publishChecks.sanityChecks(componentType) self.set_component(oVersion, filePath) def build_asset_version(self, sAsset, sTaskType, version=0, note=''): '''Builds an AssetVersion, it takes an asset and a task as arguments"''' asset = self.getOAsset(sAsset,sTaskType) task = self.getOTask(sAsset,sTaskType) try: # ONLY HERE FOR DEV DELETE AFTERWARDS version_query = 'AssetVersion where task_id is "{}" and version is "{}" and asset.type.id is "{}"'.format( task['id'], int(version), asset['type']['id']) current_versions = self.session.query(version_query).one() if current_versions: # Deletes the old version ^^^^^^^ DEV ONLY ^^^^^^^^ self.session.delete(current_versions) self.session.commit() except: logger.info("Asset Version Creation Error %s ---------------------------------" % asset['name'])
  12. Hello again, we would like to use Dynamic Enums to let our team-members select maya plugins from a drop-down which is populated from a folder containing all plugins available. For this we prepare the dropdown contents like described here: http://ftrack.rtd.ftrack.com/en/3.3.7/developing/dynamic_enumerator.html The resulting list looks like this: [{'name': '3Delight - 8.0.572', 'value': 'C:\\ConfigurationSync\\Maya\\3Delight\\3Delight_8.0.572'}, {'name': 'abcToA - 3.0.0 - 2018 - 2.0.1', 'value': 'C:\\ConfigurationSync\\Maya\\abcToA\\3.0.0_2018_2.0.1'}, {'name': 'abcToA - 3.0.1 - 2018 -', 'value': 'C:\\ConfigurationSync\\Maya\\abcToA\\3.0.1_2018_2.1.0.1'}, {'name': 'aTools - 2.0.1', 'value': 'C:\\ConfigurationSync\\Maya\\aTools\\2.0.1'}, {'name': 'aTools - 2.0.2', 'value': 'C:\\ConfigurationSync\\Maya\\aTools\\2.0.2'}, {'name': 'bonusTools - 2018', 'value': 'C:\\ConfigurationSync\\Maya\\bonusTools\\2018'}, {'name': 'cosmos - 1.0', 'value': 'C:\\ConfigurationSync\\Maya\\cosmos\\1.0'}, {'name': 'exocortex - crate - 1.1.153', 'value': 'C:\\ConfigurationSync\\Maya\\exocortex_crate\\1.1.153'}] This list has about 150 entries in the end. We noticed, that having 2-3 entries sometimes works and sometimes not. We Cannot figure out, what the problem with this might be. Are we missing anything here? Why is this not working? Thanks very much in advance Tim
  13. Hey there, we are currently trying to send custom events via the javascript api (as the title might let you guess... ) In a Node-style js-file we're testing the following code, which is sadly not working... var EventSender = function(server, user, key) { require('isomorphic-fetch') var ftrack = require('ftrack-javascript-api'); this.session = new ftrack.Session(server, user, key); if (this.session==null) { console.log('Error creating session'); return; } this.DoStuff = function() { // TODO: find another way to solve this // make session available to all subfunctions by creating a 'locally scoped' variable // otherwise 'this.session' is only available at the outermost usage (i.e. only on line 28) // the nested functions below line 28 don't know about 'this.session' var session = this.session; if (session==null) { console.log('Error - No active Session'); return; } return session.initializing.then(function() { var event = new ftrack.Event('infected.custom-event', {foo: 'bar', xyz: true}); console.log('sending...'); return session.eventHub.publish(event); }).catch(error => {console.log(error);}); } } sender = new EventSender('', 'Admin', 'f22192fc-0cb6-11e8-b2cb-7ab7a47c9dda'); sender.DoStuff(); The resulting error-msg is: TypeError: Cannot read property 'socket' of null at EventHub._runWhenConnected (C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:307:32) at C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:224:23 at new Promise (<anonymous>) at EventHub.publish (C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:223:31) at C:\dev\javascript\ftrack.OS.management\sendEventTest.js:30:28 at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) So for some reason, the local property '_socketIo' in event_hub.js is still null inside the method '_runWhenConnected', which is called in 'publish()' on line 224. Can you tell me why that is the case? having the same setup, we already successfully created calendar-events and other objects. Side-Question: Is it possible to send a custom event via javascript-api and receive it via the python-api? Thanks in advance Tim
  14. Hi everyone, We use a cloud instance of our project and regularly our users experience some network error: proxy error, connection timeout etc Usually a retry is enough, but eventually it will stop a process and leave an asset unpublished or not entirely prepped. Have anyone experience issues like this ? Is there a common recipe to try/catch all errors that would be network related from ftrack_api ?
  15. Hey there, as part of our integrations, we want to be able to setup entries in the 'overview calendar' for 'projects and users'. for example 'Add Leave' should be available. Ideally this should be done via external api-calls in javascript. by executing this: console.info(Object.keys(session.schemas)); for (schema in session.schemas) { console.info(session.schemas[schema]); } We found out, that there is something called: 'CalendarEvent'. Are we on the right track, playing with this? Since we don't know, how to deal with this, we shoot in every direction.. Is it possible to 'Add Leave' for a user via the javascript api? If yes, how is it done? We tried this: var query = 'select id from CalendarEvent'; But the result is: '(node:7332) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: request is not defined' Any help/assistance/ideas are greatly appreciated! thanks in advance Tim
  16. Is there a way to listen to when incoming/outgoing links are created/removed via the api? The ftrack.* topic doesn't seem to fire an event when a link is created. Alternatively is there a simple way to publish an event when a link is created/removed?
  17. Hey there, we are trying to add managers programatically when a corresponding field was altered. We tried this: project = ftrack.getProject('dev_tutorial') user = ftrack.User('username') managerType = ftrack.ManagerType('Supervisor') # Add the user as a supervisor on the dev_tutorial project. manager = project.createManager(user, managerType) (taking a correct project, user and managerType) ..which is described here. But sadly this didn't work. what do we have to do to create these managers via the new api, since 'Manager' is not a known type? Generally: it helps a lot going through the migration notes and code-snippets to get hints on how to use the new api, but every now and then, we stumble on something, that can not be found. Is there a common way to find out usages? EDIT: Some addition information: This is the line that crashes: manager = project.createManager(userToUse, managerType) the resulting log gives us: 2018-01-09 10:20:00,404 - ftrack_api.event.hub.EventHub - ERROR - Error calling subscriber <Subscriber metadata={'id': '619a63bab1c443d09f4d982926e36196'} subscription="topic=ftrack.update"> for event <Event {'topic': u'ftrack.update', 'source': {u'applicationId': u'ftrack.client.web', u'user': {u'username': u'TEdelmann', u'id': u'75b59aae-e1bb-11e7-ad88-7ab7a47c9dda'}, u'id': u'b85b77aa-f51d-11e7-92c6-7ab7a47c9dda'}, 'target': u'', 'data': {u'entities': [{u'keys': [u'Briefing_Team_01_TandemProducer_EUsers'], u'objectTypeId': u'show', u'entityType': u'show', u'parents': [{u'entityId': u'108157f2-e3d9-11e7-9067-7ab7a47c9dda', u'entityType': u'show', u'parentId': None}], u'parentId': None, u'action': u'update', u'entityId': u'108157f2-e3d9-11e7-9067-7ab7a47c9dda', u'changes': {u'Briefing_Team_01_TandemProducer_EUsers': {u'new': u'Daniel Brylka', u'old': u'Daniel Schindler'}}}], u'pushToken': u'b91a65ca-f51d-11e7-b15d-7ab7a47c9dda', u'parents': [u'108157f2-e3d9-11e7-9067-7ab7a47c9dda'], u'user': {u'userid': u'75b59aae-e1bb-11e7-ad88-7ab7a47c9dda', u'name': u'Tim Edelmann'}, u'clientToken': u'b85b77aa-f51d-11e7-92c6-7ab7a47c9dda'}, 'in_reply_to_event': None, 'id': u'5e7358c282f448729f42a0d342bdd3d3', 'sent': None}>. Traceback (most recent call last): File "c:\python27\lib\site-packages\ftrack_python_api-1.3.3-py2.7.egg\ftrack_api\event\hub.py", line 693, in _handle response = subscriber.callback(event) File "C:\git\Actions\AttributeChangedHandler.py", line 58, in launch manager = project.createManager(userToUse, managerType) File "c:\dev\fcp\ftrack-connect-package\.eggs\ftrack_python_legacy_api-3.6.2-py2.7.egg\FTrackCore\api\client.py", line 232, in createManager response = xmlServer.action('create', data) File "c:\dev\fcp\ftrack-connect-package\.eggs\ftrack_python_legacy_api-3.6.2-py2.7.egg\FTrackCore\api\xmlserver.py", line 300, in action response = function(data) File "c:\Python27\lib\xmlrpclib.py", line 1243, in __call__ return self.__send(self.__name, args) File "c:\Python27\lib\xmlrpclib.py", line 1596, in __request allow_none=self.__allow_none) File "c:\Python27\lib\xmlrpclib.py", line 1094, in dumps data = m.dumps(params) File "c:\Python27\lib\xmlrpclib.py", line 638, in dumps dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 741, in dump_struct dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 762, in dump_instance self.dump_struct(value.__dict__, write) File "c:\Python27\lib\xmlrpclib.py", line 741, in dump_struct dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 762, in dump_instance self.dump_struct(value.__dict__, write) File "c:\Python27\lib\xmlrpclib.py", line 741, in dump_struct dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 762, in dump_instance self.dump_struct(value.__dict__, write) File "c:\Python27\lib\xmlrpclib.py", line 741, in dump_struct dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 762, in dump_instance self.dump_struct(value.__dict__, write) File "c:\Python27\lib\xmlrpclib.py", line 741, in dump_struct dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 719, in dump_array dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 660, in __dump f(self, value, write) File "c:\Python27\lib\xmlrpclib.py", line 762, in dump_instance self.dump_struct(value.__dict__, write) File "c:\Python27\lib\xmlrpclib.py", line 741, in dump_struct dump(v, write) File "c:\Python27\lib\xmlrpclib.py", line 652, in __dump raise TypeError, "cannot marshal %s objects" % type(value) TypeError: cannot marshal <type 'file'> objects Hope, someone has an idea!? Thanks in advance! Tim
  • Create New...