SummitAI API Docs

What is a Web Service?

A Web Service is a method of communication between two applications or electronic devices over web. You can either use pre-defined web services that come along with the SummitAI application or build Custom Services based on your organization's requirement.

Web Services are of two types:

  1. Simple Object Access Protocol (SOAP)
  2. Representational State Transfer (REST)

SOAP defines a standard communication protocol (set of rules) specification for XML-based message exchange. SOAP uses different transport protocols, such as HTTP and SMTP.

The standard protocol HTTP makes it easier for SOAP model to tunnel across firewalls and proxies without any modifications to the SOAP protocol. SOAP can sometimes be slower than middleware technologies like CORBA or ICE due to its verbose XML format.

REST describes a set of architectural principles by which data can be transmitted over a standardized interface (such as HTTP). REST does not contain an additional messaging layer and focuses on design rules for creating stateless services. A client can access the resource using the unique URL and a representation of the resource is returned. With each new resource representation, the client is said to transfer state.

While accessing RESTful resources with HTTP protocol, the URL of the resource serves as the resource identifier and GET, PUT, DELETE, POST and HEAD are the standard HTTP operations to be performed on that resource.

Provide the Service URL to create a Web Service.

Service URL Example: http://<webserviceurl>/REST/Summit_RESTWCF.svc

Replace <webserviceurl> with Host Name.

How to invoke WCF REST Services?

To Invoke WCF REST Services, Proxy Parameters are required, as mentioned below.

Proxy Parameters

To consume all WCF REST Services, user needs to pass the Proxy Class (Username, Password, Return Type) and Mandatory Fields (mentioned in the note for every JSON Object Input Parameters) to get the Output.

Service authenticates the credentials first, and then processes the User Request.


Note:

These authentication parameters are applicable for all WCF Rest Services methods.

REST Service Call Source Code

Example:

REST Service Call Source Code
WebClient webClient = new WebClient(); webClient.Headers["Content-type"] = "application/JSON"; webClient.Encoding = Encoding.UTF8;

string                                                               body                                                             = "{\"ServiceName\":\"IM_GetIncidentDetailsAndChangeHistory\",\"objCommonParameters\":{\"_ProxyDetails\":{\"Pass word\":\"XXXXX\",\"UserName\":\" test@domain.com\",\"ProxyID\":0,\"ReturnType\":\"JSON\",\"OrgID\":1},\"TicketNo\":6290}}";

string URL = "http://<Customer_URL>/REST/Summit_RESTWCF.svc"; string method = "CommonWS_JsonObjCall";

string parameter = "";

string final = string.Format("{0}/RESTService/{1}{2}", URL, method, parameter); string res1 = webClient.UploadString(final, "POST", body); Console.WriteLine(res1);

Console.ReadLine();