Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


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

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.

Example 

In this article, we will guide you through an example for the methods related to creating, updating, and deleting an incident. The following API needs to be called, by providing the required URL, parameters, and headers, in order to receive the response.



Parameters


Headers


Request



Response

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


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 


  • No labels