Multiple Task SCTASK under single RITM- REST API

Nanasaheb
Kilo Contributor

I use Python Script to create tasks in multiple categories, 

now i need REST API url which help me to create more TASKS under one RITM/REQ.

anyone did this before?


update:
I have one ritm with one task is present but i want to add more  tasks under that RITM, any idea about it?

 

Thank You in advance

1 ACCEPTED SOLUTION

My bad. Need to also set "request_item". Change the line setting response to following.

 

    response = requests.post(url, auth=(SERVICENOW_USER, SERVICENOW_PWD), headers=headers,
                             data="{\"parent\":\"" + task.get('rtim')
                                  + "\",\"priority\":\"" + task.get('priority')
                                  + "\",\"state\":\"" + task.get('state')
                                  + "\",\"short_description\":\"" + task.get('short_description')
                                  + "\",\"request_item\":\"" + task.get('rtim')
                                  + "\",\"assignment_group\":\"" + task.get('assignment_group') + "\"}")

Output

find_real_file.png

View solution in original post

10 REPLIES 10

yes, now its working, missed to pass this variable value, instead of this i passed request thats why it was not working.

Thank You!!