• Products
  • Get started
  • Documentation
  • Resources

Manage Opsgenie actions with REST Endpoint

To define REST Endpoint actions, click Add Action within the 'Manage Actions' window to create an Opsgenie action via REST Endpoint.

Add action

Step 1: Action Definition

1.1. Specify the name of the action. Then, select 'Type' as Rest Endpoint.

1.2. Select a predefined Rest Endpoint channel.

1.3. Configure the user permissions on Manage Permissions section. The default choice allows all users in the team to perform Opsgenie actions. Check the box for 'Selected users on this team can use the action choice' and enter the name of users to permit. Please make sure that the selected users have the required role permissions to execute automation actions.

1.4. Click Enable action policies to allow Opsgenie to automatically execute the action.

1.5. Click Next to configure Parameters.

Action definition

Step 2: Parameters

If you enable action policies option, you have to define Predefined actions only since the policy will be executed without any customer interaction.

2.1. Set the parameter name.

2.2. Select the parameter type.

2.3. Click Required box if the parameter must be defined for the corresponding Rest Endpoint action.

2.4. Select Predefined to execute the action with a determined value.

Otherwise, select Prompt User to execute the action with a value which is chosen by the user at the run time. Prompt user allows you to select input type as 'Drop-down list', 'Free-form text' or 'Checkbox'.

  • If you select the Drop-down list, users are asked to enter inputs in the Values section. During the action execution, users will be able to select values from the drop-down list to run action.

  • If you select Free-form text option, it allows users to input any value for this parameter at run time.

  • If the parameter type is List, you will be asked to enter values for 'Checkbox' input type. Checkbox allows you to select multiple values during the action execution.

    2.5. Click 'Add a new parameter' to configure additional parameters.

3. Click Create to save the REST action.

Action parameters

JSON format for REST Endpoint Template

JSON

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "timestamp": "ISO8601", "alert": { "id": "51c1e39a-ef82-4cb8-889d-a20ca7081c75-1543216722032", "createdAt": "ISO8601", "ownerTeamId": 368354385464, "message": "Instance reachability check failed at November 24, 2018 10:24 AM UTC+2 (22 minutes ago)", "source": "CloudWatch", "aknowledged": "False", "snoozedUntil": "ISO8601" }, "action:": { "name": "RescueEC2", "parameters": [ { "name": "UnreachableInstanceId", "type": "String", "value": "i-04df752edb6de0ada" }, { "name": "LogDestination", "type": "String", "value": "testS3bucket" }, { "name": "EC2RescueInstanceType", "type": "string", "value": "t2.small" }, { "name": "SubnetId", "type": "String", "value": "testSubnet" } {

 

Still need help?

The Atlassian Community is here for you.