Accessing Task Template
4 4

12 posts in this topic

Hi

I'm wondering how to create the tasks from a task template, through the API. I can't figure out how to access them.

I was following the following doc: http://ftrack-python-api.rtd.ftrack.com/en/stable/example/project.html but it doesn't show how to create from task template.

The task template would appear to be a child of the schema if the interface is anything to go by, but there doesn't seem to be anything in the items of the schema object, or a dedicated function. I did see there was a "_task_workflow" is that what I want, I presume not as its marked as private.

Also according to the API, http://ftrack-python-api.rtd.ftrack.com/en/stable/api_reference/entity/project_schema.html the "get_types" only require one arg called schema, its not clear whats wanted here. As the object its self is supposed to represent the schema. Looking at your example code though you have passed a string called "Task". How do I know what options I can pass here?

thanks

Phil

Share this post


Link to post
Share on other sites

Hi,

Thank you for reaching out.

Task templates are currently not exposed via the API, so it is not possible to query or create them other than from the interface in settings. I don't see a reason to why they aren't exposed, so I'll add a ticket to follow up and add the missing entities and attributes to the schema.

Regards,
Lucas

Share this post


Link to post
Share on other sites

Hi Phil, 

 

Support for accessing task templates through the API was added in version 3.5.3 ( http://ftrack.rtd.ftrack.com/en/stable/release/release_notes.html#release-3.5.3 ). You can find some examples of the usage in the ftrack python api documentation http://ftrack-python-api.rtd.ftrack.com/en/latest/example/task_template.html

 

cheers

Eric

 

Share this post


Link to post
Share on other sites
On 30/08/2017 at 11:25 AM, Eric Hermelin said:

Hi Phil, 

 

Support for accessing task templates through the API was added in version 3.5.3 ( http://ftrack.rtd.ftrack.com/en/stable/release/release_notes.html#release-3.5.3 ). You can find some examples of the usage in the ftrack python api documentation http://ftrack-python-api.rtd.ftrack.com/en/latest/example/task_template.html

 

cheers

Eric

 

Hi i just followed the current example but the key ['task_templates'] don't exist inside project['project_schema'].In the site i have access to those task templates but i can't find them via the python api.

Share this post


Link to post
Share on other sites
12 hours ago, OttoniBastos said:

Hi i just followed the current example but the key ['task_templates'] don't exist inside project['project_schema'].In the site i have access to those task templates but i can't find them via the python api.

Which version of ftrack are you currently on?

Share this post


Link to post
Share on other sites

I see, so the issue is that the version of ftrack you have does not support task templates through the api:

Quote

Support for accessing task templates through the API was added in version 3.5.3 ( http://ftrack.rtd.ftrack.com/en/stable/release/release_notes.html#release-3.5.3 ). You can find some examples of the usage in the ftrack python api documentation http://ftrack-python-api.rtd.ftrack.com/en/latest/example/task_template.html

If you email support@ftrack.com with your company information we can see if we can get you upgrade before the scheduled window. Make sure to add this forum post as a reference.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
4 4