REST API w/Python for SENDING PUT/POST for assigning ticket to myself

DavideT
Tera Contributor

Hello everyone,

 

I am new to the community, sorry if I mismatched the board.

 

I am new to snow api environment. I am currently working on getting ticket table via get (python requests).

 

I wonder if you can write just a sample snippet for assigning incident number xxx to myself via API.

 

Thank you a lot in advance.

 

Davide

9 REPLIES 9

AshishKM
Kilo Patron
Kilo Patron

Hi @DavideT ,

Do you have http post method for “Assigned Me” , which api method you are using REST or Table. Seems like you are trying a post call to ServiceNow. 
-Thanks

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

DavideT
Tera Contributor

Hello,

 

Working with Service-Now REST API. I need to assign certain incidents to me. I wonder if anyone could help with service-now REST API ("put" api I guess).

I need an example for assigning a given incident to myself.

 

Thank you!

DavideT
Tera Contributor
Imagine a new incident is created by another group and it has state 'Assigned' just because it is addressed to my Group.
I need to assign it manually to me, so that it changes state to 'In Progress'.
I do it by clicking the 'assign to me' button in the service-now portal.
I need to perform it via API.
 
sys_action is assign_incident_to me, as per example extracted from browser network info:

 

sys_target:
incident
sys_uniqueName:
sys_id
sys_uniqueValue:
xxxxxxxxxxxxxxxxxxxxxx
sys_displayValue:
INC0226864
sys_titleValue:
MIROPLMNF03 - Memory Usage Linux
onLoad_sys_updated_on:
2023-11-18 07:15:26
sys_row:
0
sys_modCount:
3
 
sys_action:
assign_incident_to_me
 
thank you

DavideT
Tera Contributor

I get this error