Cloud
Jira Service Management ops / Reference / REST API

Policies

Postman Collection
OpenAPI
GET

List global alert policiesExperimental

List global alert policies

read:ops-config:jira-service-management

Request

Query parameters

offset

integer

size

integer

Responses

Returned if the request is successful.

application/json

GlobalPolicyPaginatedResponse
GET/v1/alerts/policies
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 { "values": [ { "type": "alert", "id": "69291859-ed73-4396-8b74-c61a3c810cdf", "name": "FE Daily On-call Policy", "enabled": false, "order": 1 } ], "links": { "next": "/v1/alerts/policies?offset=1&size=1" } }
POST

Create global alert policyExperimental

Create global alert policy

read:ops-config:jira-service-management

Request

Request bodyapplication/json

type

string

Required
name

string

Required
description

string

enabled

boolean

Required
filter

object

timeRestriction

object

alias

string

message

string

Required
alertDescription

string

source

string

Responses

Returned if the request is successful.

application/json

GlobalPolicyPaginatedResponse
POST/v1/alerts/policies
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "type": "alert", "name": "policy for dynamoDB", "description": "policy desc", "enabled": true, "filter": { "type": "match-any-condition", "conditions": [ { "field": "message", "not": false, "operation": "contains", "expectedValue": "asd", "order": 0 } ] }, "timeRestriction": { "enabled": true, "timeRestrictions": [ { "startHour": 0, "startMinute": 0, "endHour": 1, "endMinute": 0 } ], "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT" }, "alias": "{{alias}}", "message": "{{message}} addional message", "alertDescription": "{{description}}", "source": "{{source}}", "entity": "{{entity}}", "responders": [ { "type": "team", "id": "0f5f6b40-7dca-44fc-8036-6d6d550e853f" } ], "actions": [ "action1, action2" ], "tags": [ "tag1", "tag2" ], "details": {}, "continue": false, "updatePriority": false, "keepOriginalResponders": true, "keepOriginalDetails": true, "keepOriginalActions": true, "keepOriginalTags": true }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 { "values": [ { "type": "alert", "id": "69291859-ed73-4396-8b74-c61a3c810cdf", "name": "FE Daily On-call Policy", "enabled": false, "order": 1 } ], "links": { "next": "/v1/alerts/policies?offset=1&size=1" } }
GET

Get global alert policyExperimental

Get global alert policy

read:ops-config:jira-service-management

Request

Path parameters

policyId

string

Required

Responses

Returned if the request is successful.

application/json

GetGlobalAlertPolicy
GET/v1/alerts/policies/{policyId}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies/{policyId}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
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 36 37 38 39 40 41 42 43 44 45 46 47 48 { "type": "ALERT", "id": "5422f159-0ca5-4fd9-9f73-770b2778baa3", "name": "test 2", "description": "asdasd", "teamId": "", "enabled": true, "order": 0, "filter": { "type": "match-any-condition", "conditions": [ { "field": "message", "not": false, "operation": "contains", "expectedValue": "asd", "order": 0 } ] }, "timeRestriction": { "enabled": true, "timeRestrictions": [ { "startHour": 0, "startMinute": 0, "endHour": 1, "endMinute": 0 } ], "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT" }, "alias": "{{alias}}", "message": "{{message}} asd", "alertDescription": "{{description}}", "source": "{{source}}", "entity": "{{entity}}", "responders": [], "actions": [], "tags": [], "details": {}, "continue": false, "updatePriority": false, "keepOriginalResponders": true, "keepOriginalDetails": true, "keepOriginalActions": true, "keepOriginalTags": true }
PUT

Put global alert policyExperimental

Put global alert policy

read:ops-config:jira-service-management

Request

Path parameters

policyId

string

Required

Request bodyapplication/json

type

string

Required
name

string

Required
description

string

enabled

boolean

Required
filter

object

timeRestriction

object

alias

string

message

string

Required
alertDescription

string

source

string

Responses

Returned if the request is successful.

application/json

GetGlobalAlertPolicy
PUT/v1/alerts/policies/{policyId}
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 curl --request PUT \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies/{policyId}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "type": "alert", "name": "policy for dynamoDB", "description": "policy desc", "enabled": true, "filter": { "type": "match-any-condition", "conditions": [ { "field": "message", "not": false, "operation": "contains", "expectedValue": "asd", "order": 0 } ] }, "timeRestriction": { "enabled": true, "timeRestrictions": [ { "startHour": 0, "startMinute": 0, "endHour": 1, "endMinute": 0 } ], "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT" }, "alias": "{{alias}}", "message": "{{message}} addional message", "alertDescription": "{{description}}", "source": "{{source}}", "entity": "{{entity}}", "responders": [ { "type": "team", "id": "0f5f6b40-7dca-44fc-8036-6d6d550e853f" } ], "actions": [ "action1, action2" ], "tags": [ "tag1", "tag2" ], "details": {}, "continue": false, "updatePriority": false, "keepOriginalResponders": true, "keepOriginalDetails": true, "keepOriginalActions": true, "keepOriginalTags": true }'
200Response
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 36 37 38 39 40 41 42 43 44 45 46 47 48 { "type": "ALERT", "id": "5422f159-0ca5-4fd9-9f73-770b2778baa3", "name": "test 2", "description": "asdasd", "teamId": "", "enabled": true, "order": 0, "filter": { "type": "match-any-condition", "conditions": [ { "field": "message", "not": false, "operation": "contains", "expectedValue": "asd", "order": 0 } ] }, "timeRestriction": { "enabled": true, "timeRestrictions": [ { "startHour": 0, "startMinute": 0, "endHour": 1, "endMinute": 0 } ], "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT" }, "alias": "{{alias}}", "message": "{{message}} asd", "alertDescription": "{{description}}", "source": "{{source}}", "entity": "{{entity}}", "responders": [], "actions": [], "tags": [], "details": {}, "continue": false, "updatePriority": false, "keepOriginalResponders": true, "keepOriginalDetails": true, "keepOriginalActions": true, "keepOriginalTags": true }
DEL

Delete global alert policyExperimental

Delete global alert policy

read:ops-config:jira-service-management

Request

Path parameters

policyId

string

Required

Responses

Returned if the policy is deleted successfully.

DEL/v1/alerts/policies/{policyId}
1 2 3 curl --request DELETE \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies/{policyId}' \ --user 'email@example.com:<api_token>'
POST

Change the order of global alert policyExperimental

Change the order of global alert policy

read:ops-config:jira-service-management

Request

Request bodyapplication/json

order

number

Responses

Returned if the policy is deleted successfully.

POST/v1/alerts/policies/{policyId}/change-order
1 2 3 4 5 6 7 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies/{policyId}/change-order' \ --user 'email@example.com:<api_token>' \ --header 'Content-Type: application/json' \ --data '{ "order": 3 }'
POST

Enable the global alert policyExperimental

Enable the global alert policy

read:ops-config:jira-service-management

Request

Path parameters

policyId

string

Required

Responses

Returned if the request is successful.

application/json

GetGlobalAlertPolicy
POST/v1/alerts/policies/{policyId}/enable
1 2 3 4 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies/{policyId}/enable' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
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 36 37 38 39 40 41 42 43 44 45 46 47 48 { "type": "ALERT", "id": "5422f159-0ca5-4fd9-9f73-770b2778baa3", "name": "test 2", "description": "asdasd", "teamId": "", "enabled": true, "order": 0, "filter": { "type": "match-any-condition", "conditions": [ { "field": "message", "not": false, "operation": "contains", "expectedValue": "asd", "order": 0 } ] }, "timeRestriction": { "enabled": true, "timeRestrictions": [ { "startHour": 0, "startMinute": 0, "endHour": 1, "endMinute": 0 } ], "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT" }, "alias": "{{alias}}", "message": "{{message}} asd", "alertDescription": "{{description}}", "source": "{{source}}", "entity": "{{entity}}", "responders": [], "actions": [], "tags": [], "details": {}, "continue": false, "updatePriority": false, "keepOriginalResponders": true, "keepOriginalDetails": true, "keepOriginalActions": true, "keepOriginalTags": true }
POST

Disable the global alert policyExperimental

Disable the global alert policy

read:ops-config:jira-service-management

Request

Path parameters

policyId

string

Required

Responses

Returned if the request is successful.

application/json

GetGlobalAlertPolicy
POST/v1/alerts/policies/{policyId}/disable
1 2 3 4 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/alerts/policies/{policyId}/disable' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
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 36 37 38 39 40 41 42 43 44 45 46 47 48 { "type": "ALERT", "id": "5422f159-0ca5-4fd9-9f73-770b2778baa3", "name": "test 2", "description": "asdasd", "teamId": "", "enabled": true, "order": 0, "filter": { "type": "match-any-condition", "conditions": [ { "field": "message", "not": false, "operation": "contains", "expectedValue": "asd", "order": 0 } ] }, "timeRestriction": { "enabled": true, "timeRestrictions": [ { "startHour": 0, "startMinute": 0, "endHour": 1, "endMinute": 0 } ], "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT" }, "alias": "{{alias}}", "message": "{{message}} asd", "alertDescription": "{{description}}", "source": "{{source}}", "entity": "{{entity}}", "responders": [], "actions": [], "tags": [], "details": {}, "continue": false, "updatePriority": false, "keepOriginalResponders": true, "keepOriginalDetails": true, "keepOriginalActions": true, "keepOriginalTags": true }

Rate this page: