Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Trying to use the GET TASK endpoint https://api.us.cloud.talend.com/tmc/v2.6/executables/tasks
We have several tasks with similar names. Is there a way to query for EXACT name match rather than filter which may return more than 1 record.
For example, we have tasks named:
myTask
myTask_part2
myTask_part3
Can I call the endpoint and have it return JUST the taskID for myTask ?
The workaround is that I have to take the multi-record output and strip out the extra records...
Thanks !
Hi @Phil Wang
Perhaps you can use the search resource:
https://api.us.cloud.talend.com/tmc/swagger/swagger-ui.html#/tasks/searchTasks
Hi @Anselmo Peixoto
Using ArtifactId in post method would force to do the exact match. The same could be achievable through https://api.us.cloud.talend.com/tmc/v2.6/executables/tasks.
Mr @Phil Wang was keen about doing exact match based on task name, workspace & environment.
Hi @chaitanya thalikota / @Phil Wang
I'm not sure if all the arguments are mandatory for search resource and unfortunately I cannot try it right now.
Did you try using only task name, workspace and environment?
{
"name": "myTask",
"environmentId": "6148511d6ccc6d41563574e5",
"workspaceId": "614851d46ccc6d41563574ea",
}
Hi @Anselmo Peixoto ,
Thank you for your suggestion. Unfortunately, using environmentid, workspaceid, and task name does not provide an exact match but a filter using the name just like the original endpoint...
using
{
"name": "myTask",
"environmentId": "6148511d6ccc6d41563574e5",
"workspaceId": "614851d46ccc6d41563574ea",
}
I am still getting results that include myTask, myTask_part1, myTask_part2