アラートの取得。アラート名に基づいてアラートの詳細を取得します。
get
/OracleBAMREST/api/projects/{projectname}/queries/businessqueries/alerts/{alertname}
リクエスト
この操作にはリクエスト・パラメータはありません。
レスポンス
サポートされているメディア・タイプ
- application/json
- application/xml
200 レスポンス
成功
レスポンスの例(application/json)
{
"alert":{
"oEvent":{
"oContinuousQueryName":"BAMFramework.ASN_KPI_SLAViolation_Email_Alerting_HIGHAlert_ScheduledQuery",
"oContinuousQueryString":"CREATE SCHEDULED QUERY BAMFramework.ASN_KPI_SLAViolation_Email_Alerting_HIGHAlert_ScheduledQuery AS \"SELECT SUMSLAViolationForKPI AS KPI_MEASURE, 10 AS KPI_THRESHOLD, 'ASN_KPI_SLAViolation_Email_Alerting' AS KPI_NAME, '/project/BAMFramework/kpi/ASN_KPI_SLAViolation_Email_Alerting' AS KPI_ID, 'HIGH' AS KPI_RISK_STATUS, CAST(CURRENT_TIMESTAMP AS TIMESTAMP) AS KPI_TIMESTAMP FROM ( SELECT SUM(CASE WHEN ( (((CAST(DeliveredTimestamp AS DATE) - CAST(ReceivedTimestamp AS DATE)) * 24 * 60 * 60) >300 ) ) THEN (1) ELSE (0) END) AS SUMSLAViolationForKPI FROM BEAM_VIEW_68 WHERE ( (DeliveredTimestamp IS NOT NULL ) AND ((((CAST(LOCALTIMESTAMP AS DATE) - CAST(DATAOBJECT_CREATED AS DATE)) * 24 * 60 * 60) /60)<60 24 60 ) having (sum(case when ( (((cast(deliveredtimestamp as date) - cast(receivedtimestamp date)) * 60)>300 ) ) THEN (1) ELSE (0) END)>(10.0+10) ) ) S1\" REFRESH ON \"2015/03/12 02:37:00 PM -0700\" EVERY 1 DAY START IMMEDIATE destination \"jms:queue/oracle.beam.cqservice.mdbs.alertengine:queuecf/oracle.beam.cqservice.mdbs.alertengine?batch=true\"",
"m_strKPIId":"/project/BAMFramework/kpi/ASN_KPI_SLAViolation_Email_Alerting",
"m_strRangeType":"HIGH"
},
"systemManaged":false,
"internal":false,
"strAlertXml":" KPI CQL BAMFramework.ASN_KPI_SLAViolation_Email_Alerting_HIGHAlert_ScheduledQuery /project/BAMFramework/kpi/ASN_KPI_SLAViolation_Email_Alerting HIGH notify Send ganesh.rajendran@nike.com,amik.basu@nike.com SMTP ",
"bIsKPIAlert":true,
"displayName":null,
"createdDate":"2015-05-12T23:55:47.015+0000",
"oActionList":[
{
"oSelectedActions":{
"entries":[
{
"key":"MESSAGE_EMAIL",
"value":{
"strEmail":"ganesh.rajendran@nike.com,amik.basu@nike.com",
"strMessageText":"BAM Alert-Common Audit SLA violation count exceeds 20. Appropriate action should be taken.\n\nRegards\nBAMAdmin\n",
"strMessageSubject":"DEVELOPMENT ENVIRONMENT-BAM Alert : CommonAudit SLA Violation [Date/Time Sent] ",
"oMessageSubjectElements":[
{
"strType":"text",
"strValue":"DEVELOPMENT ENVIRONMENT-BAM Alert : CommonAudit SLA Violation ",
"strDisplayValue":null
},
{
"strType":"DateTimeElement",
"strValue":"Date/Time Sent",
"strDisplayValue":null
},
{
"strType":"text",
"strValue":"",
"strDisplayValue":null
}
],
"oMessageTextElements":[
{
"strType":"text",
"strValue":"BAM Alert-Common Audit SLA violation count exceeds 20. Appropriate action should be taken.\n\nRegards\nBAMAdmin\n",
"strDisplayValue":null
}
]
}
}
]
},
"oConstraint":{
"oStartTime":null,
"oDayOfWeek":[
"MONDAY"
],
"oFromDateTime":null,
"bIsParticularDayOfWeekCondition":false,
"bIsBetweenTwoDaysCondition":false,
"bIsFromDateSet":true,
"oEndTime":null,
"oToDateTime":null,
"bIsBetweenTwoTimeCondition":false,
"bIsToDateSet":true,
"oSelectedDayOfWeek":[
"MONDAY"
]
}
}
],
"id":"/project/BAMFramework/alert/ASN_KPI_SLAViolation_Email_Alerting_HIGH_Alert",
"createdBy":"testuser",
"name":"ASN_KPI_SLAViolation_Email_Alerting_HIGH_Alert",
"modifiedBy":"testuser",
"bIsActive":true,
"modifiedDate":"2015-05-12T23:55:47.015+0000",
"description":"HIGH alert for KPI ASN_KPI_SLAViolation_Email_Alerting"
},
"links":[
{
"rel":"self",
"href":"http://example.com:7001/OracleBAMREST/api/projects/BAMFramework/alerts/ASN_KPI_SLAViolation_Email_Alerting_HIGH_Alert"
}
]
}60>
例
次の例に、cURLを使用してRESTリソースに対するGETリクエストを送信し、特定のタイプのすべての項目を検索する方法を示します。
curl -i -X GET https://<hostname>/content/management/api/v1/items?field:type:equals=ModelType
例: レスポンス・ヘッダー
次にレスポンス・ヘッダーの例を示します。
HTTP/1.1 200 OK Cache-Control: max-age=0 Content-Length: 1866 Content-Type: application/json Date: Wed, 11 Jan 2017 08:54:01 GMT Etag: "423a8d67e807918602d2f31db7021524446166caea97cb4aff8b8a18cfc8ebe6" Server: Apache-Coyote/1.1 X-XSS-Protection: 1 x-content-type-options: nosniff
例: レスポンス本文
JSON形式で返されるレスポンスの例を次に示します。CaaSシステムから検索される特定のタイプの項目(ModelType)のリストを表示します。
{ "hasMore": false, "limit": 1, "count": 1, "items": [ { "id": "ModelType_core_b2313769-4573-429d-ab2e-23cea2f9f5ff", "description": "", "link": { "href": "https://<hostname>/content/management/api/v1/items/ModelType_core_b2313769-4573-429d-ab2e-23cea2f9f5ff", "rel": "Reference", "templated": false, "method": "GET", "profile": "", "mediaType": "" }, "data" : { "Model": "BMW Series", "Year": "2016" } }, { "id": "ModelType_core_b261389-4573-589d-af2e-28cea2f9f5ee", "description": "", "link": { "href": "https://<hostname>/content/management/api/v1/items/ModelType_core_b261389-4573-589d-af2e-28cea2f9f5ee", "rel": "Reference", "templated": false, "method": "GET", "profile": "", "mediaType": "" }, "data" : { "Model": "Honda Accord", "Year": "2017" } }, ], "links": [ { "href": "https://<hostname>/content/management/api/v1/types/ModelType/items", "rel": "self", "templated": false, "method": "", "profile": "", "mediaType": "" }, { "href": "https://<hostname>/content/management/api/v1/types/ModelType/items", "rel": "canonical", "templated": false, "method": "", "profile": "", "mediaType": "" }, { "href": "https://<hostname>/content/management/api/v1/metadata-catalog/items", "rel": "describedby", "templated": false, "method": "GET", "profile": "", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/management/api/v1/items?offset=0&field:type:equals=ModelType", "rel": "first", "templated": false, "method": "", "profile": "", "mediaType": "" }, { "href": "https://<hostname>/content/management/api/v1/items?offset=0&field:type:equals=ModelType", "rel": "last", "templated": false, "method": "", "profile": "", "mediaType": "" } ], "offset": 0 }