This resource represents the contract to create/read/update/delete of Policies in Jira Service Management.
List global alert policies
read:ops-config:jira-service-management
integer
integer
Returned if the request is successful.
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'
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"
}
}
Create global alert policy
read:ops-config:jira-service-management
string
Requiredstring
Requiredstring
boolean
Requiredobject
object
string
string
Requiredstring
string
Returned if the request is successful.
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
}'
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 global alert policy
read:ops-config:jira-service-management
string
RequiredReturned if the request is successful.
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'
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 global alert policy
read:ops-config:jira-service-management
string
Requiredstring
Requiredstring
Requiredstring
boolean
Requiredobject
object
string
string
Requiredstring
string
Returned if the request is successful.
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
}'
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
}
Delete global alert policy
read:ops-config:jira-service-management
string
RequiredReturned if the policy is deleted successfully.
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>'
Change the order of global alert policy
read:ops-config:jira-service-management
number
Returned if the policy is deleted successfully.
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
}'
Enable the global alert policy
read:ops-config:jira-service-management
string
RequiredReturned if the request is successful.
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'
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
}
Disable the global alert policy
read:ops-config:jira-service-management
string
RequiredReturned if the request is successful.
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'
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: