Incident Controller
In this article you will learn how to retrieve and create Incidents using the REST API. In ISM, incidents are caused due to interruptions or a reduction in the quality of the service that is caused by:
- Known or existing issue
- Result of a failure
- Error in the IT object or device
Get Method - Retrieve Incident
While retrieving a record such as incident, from a server, you can learn how APIs use HTTP methods and Response codes to differentiate operations and results. The following example describes how you can retrieve the existing incidents record.:
- Click GET or Expand Operations to retrieve information.
- Specify the following details in the Parameters section.:
- ISM application URL
- User authtoken
- Slice token
- Web service user name and password - Click Try it out. You will get the response as follows.
Response
After the GET request is executed, a response is received in the following format as specified below.
POST Method- Incident
You can use a POST method to create a new resource such as incident, request, and so on. The following example describes how you can create a new incident.
- Click POST to create information.
- Specify the following details in the Parameters section.:
- ISM application URL
- User authtoken
- Slice token
- Web service user name and password - Click the Example Value text box. The operations displayed in the text box will be copied to the Incident text box.
- Click Try it out. You will get the response as follows.
Valid Ticket Attributes
The following information is displayed in the Example Value box. This is applicable to all the ticket types.
Name | Description |
---|---|
ActionId | ID of the workflow need to be passed |
AffectedService | Name of the Affected Service |
AffectedServiceID | ID of the Affected Service |
ApprovalList | Not available to update/modify from the REST API |
AssignedCaseID | Not available to update/modify from the REST API |
AssignedContactID | ID of the Analyst to assign the ticket |
AssignedContactUserName | Username of the Analyst to assign the ticket |
AssignedGroup | Name of the Assigned group to assign the ticket |
AssignedGroupID | Id of the Assigned group to assign the ticket |
AssignedID | ID of the Analyst to assign the ticket |
AssignedIndividual | Username of the Analyst to assign the ticket |
AssignedIndividualExternalUserID | Not available to update/modify from the REST API |
AssignedIndividualID | ID of the Analyst to assign the ticket |
AssignedTo | Username of the Analyst to assign the ticket |
AutomatedFullfillmentDetailFields | Deprecated |
AutomationWFExecuteMode | Deprecated |
CasaWorkflowExecuteOnActionId | Deprecated |
CasaWorkflowInitiated | Deprecated |
Categorization | Hierarchy of the Categorization like "class >> category >> type >> item" |
CategorizationCategory | Name of the Category of the CCTI |
CategorizationClass | Name of the Class of the CCTI |
CategorizationID | ID of the CCTI |
CategorizationItem | Name of the Item of CCTI |
CategorizationItems | Not available to update/modify from the REST API |
CategorizationType | Worklog update to be Client viewable then pass '1' and '0' for Not to be viewable by SSU |
ClosedDateTimestamp | Not available to update/modify from the REST API |
ClosedGroupID | Not available to update/modify from the REST API |
ClosedGroupName | Not available to update/modify from the REST API |
ClosedUserName | Not available to update/modify from the REST API |
CreationById | Not available to update/modify from the REST API |
CreationGroupID | Not available to update/modify from the REST API |
CreationGroupName | Not available to update/modify from the REST API |
CreationTimestamp | Not available to update/modify from the REST API |
CreationUserName | Not available to update/modify from the REST API |
CustomFields | Need to pass the name value pair in an array as shown below "CustomAttributes": {"customattribute_name1":"customattribute_value1", "customattribute_name2":"customattribute_value2"}, |
CustomSearch | Not available to update/modify from the REST API |
CustomerImpact | Not available to update/modify from the REST API |
Description | Short description for the ticket |
DescriptionLong | Long description for the ticket |
ExternalID | Not available to update/modify from the REST API |
GUID | Not available to update/modify from the REST API |
GlobalRelationshipTicketAssignedID | Not available to update/modify from the REST API |
GlobalRelationshipTicketID | Not available to update/modify from the REST API |
GlobalRelationshipType | Not available to update/modify from the REST API |
HasAttachments | Not available to update/modify from the REST API |
Impact | Name/Label of the Impact |
ImpactCode | Code of the Impact |
IsArchived | Not available to update/modify from the REST API |
IsReadOnly | Not available to update/modify from the REST API |
IsSaveNExit | Not available to update/modify from the REST API |
KBArticleID | Not available to update/modify from the REST API |
LastModGroupID | Not available to update/modify from the REST API |
LastModGroupName | Not available to update/modify from the REST API |
LastModTimestamp | Not available to update/modify from the REST API |
LastModUserName | Not available to update/modify from the REST API |
LastWorklog | Not available to update/modify from the REST API |
LastWorklogDate | Not available to update/modify from the REST API |
LockedByExternalUserId | Not available to update/modify from the REST API |
LockedByUsername | Not available to update/modify from the REST API |
MdrElementID | Not available to update/modify from the REST API |
MetricKeysThrottled | Not available to update/modify from the REST API |
NonTranslatedParentTypeName | Not available to update/modify from the REST API |
NonTranslatedTicketStatus | Not available to update/modify from the REST API |
OrgStatus | Not available to update/modify from the REST API |
OriginalPlanedEnd | Not available to update/modify from the REST API |
OutageStartTimestamp | Not available to update/modify from the REST API |
OverrideAutoRouting | Not available to update/modify from the REST API |
Phase | Name of the Phase to be updated in the ticket |
Priority | Label of the Priority |
PriorityCode | Code of the Priority |
ProcessFlowID | Not available to update/modify from the REST API |
ProcessFlowIDStatus | Not available to update/modify from the REST AP |
ProcessGUIFlowID | Not available to update/modify from the REST API |
ReadOnlyMsg | Not available to update/modify from the REST API |
ReasonCode | Text for the Reasoncode for the ticket |
RecentActivity | Not available to update/modify from the REST API |
RelatedCI | Not available to update/modify from the REST API |
RelatedCICount | Not available to update/modify from the REST API |
RequestCatalogAttachmentId | Not available to update/modify from the REST API |
RequestCatalogDescription | Not available to update/modify from the REST API |
RequestCatalogId | Not available to update/modify from the REST API |
RequestCatalogName | Not available to update/modify from the REST API |
RequestCatalogWorkflowId | Not available to update/modify from the REST API |
RequestedForAltEmail | Not available to update/modify from the REST API |
RequestedForAltPhone | Not available to update/modify from the REST API |
RequestedForExternalUserID | Not available to update/modify from the REST API |
RequestedForID | Not available to update/modify from the REST API |
RequestedForOrgHierarchicalPath | Not available to update/modify from the REST API |
RequestedForOrgLevel | Not available to update/modify from the REST API |
RequestedForOrgName | Not available to update/modify from the REST API |
RequestedForRootOrgId | Not available to update/modify from the REST API |
RequestedForRootOrgName | Not available to update/modify from the REST API |
RequestedForUserID | ID of the RequestedFor |
RequestedForUserName | Name of the RequestedFor User |
RequestedForVIPFlag | Not available to update/modify from the REST API |
RequestedOrgID | Not available to update/modify from the REST API |
RequesterAltEmail | Not available to update/modify from the REST API |
RequesterAltPhone | Not available to update/modify from the REST API |
RequesterExternalUserID | Not available to update/modify from the REST API |
RequesterID | Id of the Requester User |
RequesterOrgHierarchicalPath | Not available to update/modify from the REST API |
RequesterOrgID | Not available to update/modify from the REST API |
RequesterOrgLevel | Not available to update/modify from the REST API |
RequesterOrgName | Not available to update/modify from the REST API |
RequesterRootOrgId | Id of the RequesterRoot Org |
RequesterRootOrgName | Name of the RequesterRoot Org |
RequesterUserID | Not available to update/modify from the REST API |
RequesterUserName | Not available to update/modify from the REST API |
RequesterUserNameWithVIPFlag | Not available to update/modify from the REST API |
RequesterVIPFlag | Not available to update/modify from the REST API |
RequiresCabApproval | Not available to update/modify from the REST API |
Resolution | Text to be populated for Resolution for the Ticket |
ResolvedDateTimestamp | Not available to update/modify from the REST API |
ResolvedGroupID | Not available to update/modify from the REST API |
ResolvedGroupName | Not available to update/modify from the REST API |
ResolvedUserName | Not available to update/modify from the REST API |
ResolvedUsing | Not available to update/modify from the REST API |
ResolvedUsingItemAssignedCaseID | Not available to update/modify from the REST API |
ResolvedUsingItemAssignedID | Not available to update/modify from the REST API |
ResolvedUsingItemID | Not available to update/modify from the REST API |
ResolvedUsingItemType | Not available to update/modify from the REST API |
RootCause | Text to be populated for Rootcause for the Ticket |
SLAComplianceStatus | Not available to update/modify from the REST API |
SLADueTargetName | Not available to update/modify from the REST API |
SLADueTimestamp | Not available to update/modify from the REST API |
SLAHolidayID | Not available to update/modify from the REST API |
SLAResolveByTimestamp | Not available to update/modify from the REST API |
SLAStartDate | Not available to update/modify from the REST API |
SLATimezoneID | Not available to update/modify from the REST API |
SendWorklogEmail | Not available to update/modify from the REST API |
Severity | Not available to update/modify from the REST API |
Source | Label of the Source |
SourceCode | Code of the Source |
SupportEmailAddress | Not available to update/modify from the REST API |
TenantId | Not available to update/modify from the REST API |
TicketAging | Not available to update/modify from the REST API |
TicketAgingRange | Not available to update/modify from the REST API |
TicketIdentifier | ID of the Ticket identifier like 100-xx, 200-xx, 300-xx, 400-xx, 500-xx |
TicketImagePath | Not available to update/modify from the REST API |
TicketStatus | Status of the Ticket |
TicketTypeId | Not available to update/modify from the REST API |
TotalTimeSpent | Not available to update/modify from the REST API |
TranslatedSLAComplianceStatus | Not available to update/modify from the REST API |
TranslatedTypeName | Not available to update/modify from the REST API |
TwoRequests | Not available to update/modify from the REST API |
TypeName | Not available to update/modify from the REST API |
Urgency | Label of the Priority |
UrgencyCode | Code of the Priority |
VIPFlag | Not available to update/modify from the REST API |
WallTicketType | Not available to update/modify from the REST API |
WorkActualDate | Not available to update/modify from the REST API |
WorkDescription | Description of the worklog |
WorkTimeSpent | Time spent in minutes |
WorkType | Not available to update/modify from the REST API |
WorkTypeCode | Not available to update/modify from the REST API |
WorklogActualDate | Not available to update/modify from the REST API always take current date |
Sample for Assigning a Ticket Using REST
{ "TicketIdentifier":"200-2", "AssignedContactUserName":"AnalystUsername", "AssignedGroup":"Administration" }
Sample for Adding a worklog and send email to the recipients (testuser@acme.com and test@acme.com) using REST
{ "TicketIdentifier":"200-3","communicationSendCC":"test@acme.com", "communicationSendTo":"testuser@acme.com", "ClientViewable":"1", "sendMail":"1", "WorklogTypeCode":"1", "Text":"The ticket has been fixed, validate and revert" }
Response
After the POST request is executed, a response is received in the following format as specified below.
Sample
GET Method - Incident/{id}
You can use this method to retrieve a specific incident details by specifying the ID. The following example describes how you can get details of a specific incident.:
- Click GET to retrieve a specific incident information.
- Specify the following details in the Parameters section.:
- ISM application URL
- User authtoken
- Slice token
- Web service user name and password
- Specify the incident ID for which you want to retrieve information. - Click Try it out. You will get the response as follows.
Now, you can validate the response code using the Status code/Response Code section in this article.
© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com