Hi Team,
I have a requirement. I have a Workflow in that I have a Transition called "Approve"
so when ever the the Issue got approved need to make a REST
I have
Header : Content-Type: application/json
URL: http://xyz.com/create_ec2_instance
Request Body: {"Location":"aws","InstanceType":"t2.nano","Tag":"mytag","Owner":"xyz"}
here is the requirement
Now I need make a REST call based on the Value selected in the Custom Field Can we do that
Example:
1) I have a custom Fields called
a) Location : aws, cnet, azure ---> Select List field
b) Instance Type: t2.nano, t2.micro, t2.small, t2.medium ----> Select List field
c) Owner ---> Text Field
d) Tag ----> Text field
e) Cost Center ---> Text field
f) Size of Memory ----> Text Field
g) Size of Disk -----> Text Field
2) Now When the issue got created in the Project based the Value in the custom Field need make a REST call based on that
---> Now i'm creating a issue with Location= aws, Instance = t2.nano, Owner = xyz, Tag= my tag, Costcenter = 8500
----> Now When the Issue got Approved it has to Make a Rest Call and create a AWS instance in AWS based the Value i gave in the Custom Field
---> same like that if i create a ticket with different value Location= cNet, Size of Memory = 30, Size of Disk = 2024, Owner = xyz, Tag= my tag, Costcenter = 8500
----> Now it has to create a the Cnet instance based the Value i given the field when the ticket got approved
Is that Possible if it is Can you please suggest me how to do it with script runner or any
other way to do it
Thanks,
Kumar
Hi Kumar -
Yes, you can make a REST call via scriptrunner. Here is an example of that:
That should point you down the right path.
Cheers,
-Ed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.