Table of Contents |
---|
Overview
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. 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.
A request consists of:
- Endpoint
- Method
- Headers
- Data (body)
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.
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.
...
Prerequisites
The following information is required before you use swagger to validate information.:
...
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. Swagger is a commonly used web application to document APIs. With 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
Status code | |
Status 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 Code | Description |
---|---|
200 | Success |
201 | Created |
204 | No content |
400 | Bad request |
403 | Forbidden |
404 | Not found |
500 | Internal server error |
How to Use Swagger
You can access Swagger using the ISM environment followed by the swagger URL as follows: https://<datacenter>.serviceaide.com/csmconnector/swagger-ui.html
Here are the Staging environment URLs
- CSMStaging: https://csmstaging.serviceaide.com/csmconnector/swagger-ui.html
- CSM2Staging: https://csm2staging.serviceaide.com/csmconnector/swagger-ui.html
- CSM5Staging: https://csm5staging.serviceaide.com/csmconnector/swagger-ui.html
Here are the Production environment URLs
- CSM2: https://csm2.serviceaide.com/csmconnector/swagger-ui.html
- CSM3: https://csm3.serviceaide.com/csmconnector/swagger-ui.html
- CSM5: https://csm5.serviceaide.com/csmconnector/swagger-ui.html
Prerequisites
Any user who has the following information can use the REST API to create, update, and delete resources.:
- ISM 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:
- On the Manage menu, click Tools and then Users.
- Select the Filter tab and select System Users from the By Type group.
- Click Apply to view the API User in the list.
- Click to edit properties. The API User page is displayed.
- Copy the AuthToken from the Basic Information section in the API User page.
Info | ||
---|---|---|
| ||
Each tenant Slice is entitled to one API user only if they want to integrate REST API with ISM. for using the REST API |
How to Access Slice Token
To copy slice token, perform the following steps:
- On the Manage menu, click Tools and then Slice Configuration. The Slice Configuration page is displayed.
- Copy the slice token by clicking the General Information tab.
GET Method - Retrieving a Resource
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.
Response
After the GET request is executed, a response is received in the following format as specified below.
POST Method- Create a Resource
PUT Method- Update a Resource
...
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) |
---|