Post API to create an incident with the assignment group, Assigned To, Impact, Urgency and state all field that are mandatory in body.

Jones1
Kilo Contributor

Post API to create an incident with the assignment group, Assigned To, Impact, Urgency and state all field that are mandatory in body.

7 REPLIES 7

can you help review the attached scrip for any correct

Are you facing any issue? or it's working fine?

ColemanStr
Tera Contributor

To create an incident using a RESTful API, you typically need to send a POST request to the appropriate endpoint with a JSON payload containing the required fields. Below is a generic example of how you might structure such a request:

POST /api/create-incident HTTP/1.1
Host: your-api-host.com
Content-Type: application/json
Authorization: Bearer your_access_token

{
"assignment_group": "Group Name",
"assigned_to": "Assignee Name",
"impact": "High/Medium/Low",
"urgency": "High/Medium/Low",
"state": "New/In Progress/Closed",
// Other optional fields...
}

 

In this example:

  • assignment_group: The group to which the incident is assigned.
  • assigned_to: The person or team assigned to handle the incident.
  • impact: The level of impact the incident has on the system or organization.
  • urgency: How urgently the incident needs to be resolved.
  • state: The current state of the incident (e.g., new, in progress, closed).