IBM Cloud Pak for AIOps Change Risk REST API
This documentation is for the IBM Cloud Pak for AIOps Change Risk REST API
Version: 1.0.0
Endpoint Root URL
Change Risk REST API root URL is as follows:
$ROUTE/aiops/api/ai-manager/change-risk/v1
/change_requests/risk_assessment
POST
Description
Get the risk assessment by providing a change request ticket information.
Parameters
- include_explanation : true or false for turning on/off explanation. Explanation is included by default.
Responses
Code | Description |
---|---|
200 | Response |
400 | Bad request |
404 | Not found |
500 | Internal server error |
504 | Internal processing timeout |
default | unexpected error |
Example
The sample curl command resembles the following code:
CLUSTER_URL=https://cpd-cp4waiops.apps.mycluster.mydomain.myco.com/aiops/api/ai-manager/change-risk/v1
curl -X POST $CLUSTER_URL/change_requests/risk_assessment?include_explanation=true \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{
"number":"CHG0775062",
"sys_domain":"crn:v1:bluemix:public::mil01::::",
"business_service":"Network",
"short_description":"is DATACENTER 2020-05-17 08:29:00 UTC",
"description":"description text field",
"justification":"none",
"backout_plan":".",
"impact":"No",
"reason":"Replace server due to hardware issue.",
"state":"Closed",
"type":"softlayer",
"sys_created_by":"SoftLayer Jira.SA",
"assigned_to":"name@email.com",
"close_code":"successful",
"close_notes":"Change was completed successfully"
}'
The preceding data field must validate against a change record schema. The response will look similar to the following:
{
"id":"77f3f724727811eb9e81c8e0eb1474cb",
"prediction_text":"Prior ticket data insights classify this as a high risk change.",
"prediction_confidence":0.979616,
"explanation":{
"words":{
"test":0.1,
"run":0.073,
"pod":0.059,
"node":0.056,
"error":0.041,
"release":0.036,
"remove":0.027,
"backout":0.025,
"fail":0.023,
"plan":0.017,
"utc":0.017,
"system":0.013,
"previous":0.012
},
"relevant_change_tickets":[
{
"number":"CHG0675192",
"sys_domain":"crn:v1:bluemix:public::mil01::::",
"business_service":"Network",
"short_description":"is DATACENTER 2020-05-17 08:29:00 UTC",
"description":"description text field",
"justification":"none",
"backout_plan":".",
"impact":"No",
"reason":"Replace server due to hardware issue.",
"state":"Closed",
"type":"softlayer",
"sys_created_by":"SoftLayer Jira.SA",
"assigned_to":"name@email.com",
"close_code":"successful",
"close_notes":"Change was completed successfully"
"induced_incidents":[
{
"description":"description text",
"number":"INC2468135",
"severity":"1 - High"
}
]
}
],
"ticket_relevance_level":{
"CHG0675192":10.0
},
"ticket_similarity_level":{
"CHG0675192":1.0
}
}
}
/feedback/types/risk_assessment
POST
Description
Provide feedback for the corresponding change risk assessment
Responses
Code | Description |
---|---|
200 | Response |
400 | Bad request |
404 | Not found |
500 | Internal server error |
default | unexpected error |
/feedback/types/risk_assessment_explanation
POST
Description
Provide feedback for the corresponding change risk assessment
Responses
Code | Description |
---|---|
200 | Risk assessment response |
400 | Bad request |
404 | Not found |
500 | Internal server error |
default | unexpected error |
/healthcheck
GET
Summary
Gets the health of the server.
Responses
Code | Description |
---|---|
200 | OK |
500 | Internal server error |
Models
Change
Name | Type | Description | Required |
---|---|---|---|
number | string | Yes | |
sys_domain | string | No | |
business_service | string | No | |
short_description | string | No | |
description | string | No | |
justification | string | No | |
backout_plan | string | No | |
impact | string | No | |
reason | string | No | |
state | string | No | |
type | string | No | |
sys_created_by | string | No | |
assigned_to | string | Yes | |
close_code | string | No | |
close_notes | string | No |
Incident
Name | Type | Description | Required |
---|---|---|---|
number | string | Yes | |
description | string | Yes | |
severity | string | No |
Feedback
Name | Type | Description | Required |
---|---|---|---|
user_response | string | Yes |
FeedbackRiskAssessment
Name | Type | Description | Required |
---|---|---|---|
assessment_id | string | Yes | |
feedback | object | Yes |
FeedbackRiskAssessmentExplanation
Name | Type | Description | Required |
---|---|---|---|
assessment_id | string | Yes | |
relevant_ticket_number | string | Yes | |
feedback | object | Yes |
RiskAssessment
Name | Type | Description | Required |
---|---|---|---|
number | string | No | |
id | string | Yes | |
prediction_text | string | Yes | |
prediction_confidence | float | Yes | |
change_risk_score | float | Yes | |
explanation | object | Yes |
Explanation
Name | Type | Description | Required |
---|---|---|---|
words | object | Yes | |
relevant_tickets | [ object & Change ] | No | |
ticket_relevance_level | object | No | |
ticket_similarity_level | object | No |
RelevantTickets
Name | Type | Description | Required |
---|---|---|---|
RelevantTickets | array |
ErrorContainer
Name | Type | Description | Required |
---|---|---|---|
errors | [ object ] | No | |
trace | string | Example: "9daee671-916a-4678-850b-10b911f0236d" |
No |
Errors
Name | Type | Description | Required |
---|---|---|---|
Errors | array |
Error
Name | Type | Description | Required |
---|---|---|---|
http_code | integer | Example: 500 |
No |
code | string | Example: "missing_field" |
No |
message | string | Example: "The id field is required." |
No |
more_info | string | No |