Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

An API (Application Programming Interface) is a set of rules that allow programs to interact with each other. One such rule allows you to get a piece of information (resource) when you link to a specific URL or retrieve ticket information via a smart phone or a third party service. Each URL is a 'request' and the data sent back to you is known as a 'response'.

The Intelligent Service Management (ISM) Web Services allows you to encode your calls using REST (Representational State Transfer) API. REST is an architectural style that defines how applications communicate over HTTP (Hypertext Transfer Protocol). It is usually associated with exchanging JSON (JavaScript Object Notation) and XML (Extensible Markup Language) documents between a client and a server. To learn more about REST APIs, refer to REST API basics.

As an administrator you can validate the information using Swagger to create, update, and delete resources (incident, change request, and so on) from a server. Swagger is a commonly used web application to document APIs. Using Swagger you can describe your API in a common language that everyone can understandWith Swagger Serviceaide has built a simple way for developers to understand this API. In this article, we will guide you through an example for the methods related to creating, updating, and deleting an incident and how the method responds to requests.

The following HTTP methods are used in REST APIs. Use:

  • GET to retrieve a resource from a server.
  • POST to create a new resource on a server.
  • PUT to edit or update a resource on a server, which can be an object or file.
  • DELETE to remove a resource from a server.

Anchor
Status code
Status code
Status Codes/Response Code

It is important for client applications to manage HTTP status codes correctly. Status codes convey the results of your request. The following status code applies to the REST API. 

Status CodeDescription
200Success
201Created
204No content
400 Bad request 
403 Forbidden
404 Not found 
500 Internal server error 

How to Use Swagger

You can log in to Swagger using the ISM environment followed by the swagger URL as follows: https://xyz<datacenter>.serviceaide.com/csmconnector/swagger-ui.htmlxyz.serviceaide.com can be replaced by your ISM URLhtml 

Prerequisites

Any user who has the following information can use  REST API to create, update, and delete resources.:

  • ISM (earlier CSM) app URL.
  • AuthToken: auth token can only be accessed through the API user. AuthToken is required to authenticate the API user's request.
    Note: API user is created solely for the purpose of integration. To create an API user, you must contact Serviceaide Support. There is one API user for each slice. 
  • Slice token
  • Web service username
  • Web service user password

How to Access AuthToken 

To copy AuthToken, perform the following steps:

  1. On the Manage menu, click Tools and then Users.
  2. Select the Filter tab and select System Users from the By Type group.
  3. Click Apply to view the API User in the list.
  4. Click Image Modified to edit properties. The API User page is displayed.
  5. Copy the AuthToken from the Basic Information section in the API User page.


Info
titleNote

Each Slice is entitled to one API user for using the REST API 

How to Access Slice Token

To copy slice token, perform the following steps:

  1. On the Manage menu, click Tools and then Slice Configuration. The Slice Configuration page is displayed.
  2. Copy the slice token by clicking the General Information tab.

GET Method - 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.:

  1. Click GET or Expand Operations to retrieve information.
    Image Modified
  2. Specify the following details in the Parameters section.:
      - ISM application URL
      - User authtoken
      - Slice token
      - Web service user name and password
  3. 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.

Image Modified

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.

  1. Click POST to create information.
    Image Modified
  2. Specify the following details in the Parameters section.:
      - ISM application URL
      - User authtoken
      - Slice token
      - Web service user name and password
  3. Click the Example Value text box. The operations displayed in the text box will be copied to the Incident text box.
  4. Click Try it out. You will get the response as follows.

The following information is displayed in the Example Value box.

Valid Ticket Attributes

{
"ActionId": "string",
"AffectedService": "string",
"AffectedServiceID": "string",
"ApprovalList": "string",
"AssignedCaseID": "string",
"AssignedContactID": "string",
"AssignedContactUserName": "string",
"AssignedGroup": "string",
"AssignedGroupID": "string",
"AssignedID": "string",
"AssignedIndividual": "string",
"AssignedIndividualExternalUserID": "string",
"AssignedIndividualID": "string",
"AssignedTo": "string",
"AutomatedFullfillmentDetailFields": "string",
"AutomationWFExecuteMode": "string",
"CasaWorkflowExecuteOnActionId": "string",
"CasaWorkflowInitiated": "string",
"Categorization": "string",
"CategorizationCategory": "string",
"CategorizationClass": "string",
"CategorizationID": "string",
"CategorizationItem": "string",
"CategorizationItems": "string",
"CategorizationType": "string",
"ClientViewable": "string",
"ClosedDateTimestamp": "string",
"ClosedGroupID": "string",
"ClosedGroupName": "string",
"ClosedUserName": "string",
"CreationById": "string",
"CreationGroupID": "string",
"CreationGroupName": "string",
"CreationTimestamp": "string",
"CreationUserName": "string",
"CustomAttributes": {},
"CustomFields": "string",
"CustomSearch": "string",
"CustomerImpact": "string",
"Description": "string",
"DescriptionLong": "string",
"ExternalID": "string",
"GUID": "string",
"GlobalRelationshipTicketAssignedID": "string",
"GlobalRelationshipTicketID": "string",
"GlobalRelationshipType": "string",
"HasAttachments": "string",
"Impact": "string",
"ImpactCode": "string",
"IsArchived": "string",
"IsReadOnly": "string",
"IsSaveNExit": "string",
"KBArticleID": "string",
"LastModGroupID": "string",
"LastModGroupName": "string",
"LastModTimestamp": "string",
"LastModUserName": "string",
"LastWorklog": "string",
"LastWorklogDate": "string",
"LockedByExternalUserId": "string",
"LockedByUsername": "string",
"MdrElementID": "string",
"MetricKeysThrottled": "string",
"NonTranslatedParentTypeName": "string",
"NonTranslatedTicketStatus": "string",
"OrgStatus": "string",
"OriginalPlanedEnd": "string",
"OutageStartTimestamp": "string",
"OverrideAutoRouting": "string",
"Phase": "string",
"Priority": "string",
"PriorityCode": "string",
"ProcessFlowID": "string",
"ProcessFlowIDStatus": "string",
"ProcessGUIFlowID": "string",
"ReadOnlyMsg": "string",
"ReasonCode": "string",
"RecentActivity": "string",
"RelatedCI": "string",
"RelatedCICount": 0,
"RequestCatalogAttachmentId": "string",
"RequestCatalogDescription": "string",
"RequestCatalogId": "string",
"RequestCatalogName": "string",
"RequestCatalogWorkflowId": "string",
"RequestedForAltEmail": "string",
"RequestedForAltPhone": "string",
"RequestedForExternalUserID": "string",
"RequestedForID": "string",
"RequestedForOrgHierarchicalPath": "string",
"RequestedForOrgLevel": "string",
"RequestedForOrgName": "string",
"RequestedForRootOrgId": "string",
"RequestedForRootOrgName": "string",
"RequestedForUserID": "string",
"RequestedForUserName": "string",
"RequestedForVIPFlag": "string",
"RequestedOrgID": "string",
"RequesterAltEmail": "string",
"RequesterAltPhone": "string",
"RequesterExternalUserID": "string",
"RequesterID": "string",
"RequesterOrgHierarchicalPath": "string",
"RequesterOrgID": "string",
"RequesterOrgLevel": "string",
"RequesterOrgName": "string",
"RequesterRootOrgId": "string",
"RequesterRootOrgName": "string",
"RequesterUserID": "string",
"RequesterUserName": "string",
"RequesterUserNameWithVIPFlag": "string",
"RequesterVIPFlag": "string",
"RequiresCabApproval": "string",
"Resolution": "string",
"ResolvedDateTimestamp": "string",
"ResolvedGroupID": "string",
"ResolvedGroupName": "string",
"ResolvedUserName": "string",
"ResolvedUsing": "string",
"ResolvedUsingItemAssignedCaseID": "string",
"ResolvedUsingItemAssignedID": "string",
"ResolvedUsingItemID": "string",
"ResolvedUsingItemType": "string",
"RootCause": "string",
"SLAComplianceStatus": "string",
"SLADueTargetName": "string",
"SLADueTimestamp": "string",
"SLAHolidayID": "string",
"SLAResolveByTimestamp": "string",
"SLAStartDate": "string",
"SLATimezoneID": "string",
"SendWorklogEmail": "string",
"Severity": "string",
"Source": "string",
"SourceCode": "string",
"SupportEmailAddress": "string",
"TenantId": "string",
"TicketAging": "string",
"TicketAgingRange": "string",
"TicketIdentifier": "string",
"TicketImagePath": "string",
"TicketStatus": "string",
"TicketTypeId": "string",
"TotalTimeSpent": "string",
"TranslatedSLAComplianceStatus": "string",
"TranslatedTypeName": "string",
"TwoRequests": "string",
"TypeName": "string",
"Urgency": "string",
"UrgencyCode": "string",
"VIPFlag": "string",
"WallTicketType": "string",
"WorkActualDate": "string",
"WorkDescription": "string",
"WorkTimeSpent": "string",
"WorkType": "string",
"WorkTypeCode": "string",
"WorklogActualDate": "string"
}

Response

After the POST request is executed, a response is received in the following format as specified below.


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.:

  1. Click GET to retrieve a specific incident information.
    Image Modified
  2. 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.
  3. Click Try it out. You will get the response as follows.
    Image Modified

Now, you can validate the response code using the Status code/Response Code section in this article.

REST API Catalog

This the list of web services wrapper interface to enable access to the existing Intelligent Service Management (ISM) article contains functionality that is exposed through the Rest web services API. 

Child pages (Children Display)

...