Fetch labels for tasks

NicolaeP
Kilo Expert

I need to fetch the details for each task from the Visual Task Boards.
While I can find for my tasks most of the details needed using this endpoint:
`https://instance-name.service-now.com/api/now/table/vtb_card?sysparm_fields=sys_id,task,task.number,...`, 
I cannot access the labels I assigned to tasks on the UI.
How to fetch the labels assigned to each task? `task.label` added to the above endpoint is not working. 
I appreciate any help.
Thank you

1 ACCEPTED SOLUTION

NicolaeP
Kilo Expert

I found the answer in this thread:
https://www.servicenow.com/community/itsm-forum/how-do-i-lookup-tags-associated-with-any-task-record...
The path that helped me is this one:
"/api/now/table/label_entry?sysparm_query=table=vtb_card^label.nameINFeature,Idea&sysparm_fields=label.name,table_key"

View solution in original post

1 REPLY 1

NicolaeP
Kilo Expert

I found the answer in this thread:
https://www.servicenow.com/community/itsm-forum/how-do-i-lookup-tags-associated-with-any-task-record...
The path that helped me is this one:
"/api/now/table/label_entry?sysparm_query=table=vtb_card^label.nameINFeature,Idea&sysparm_fields=label.name,table_key"