0 Followers · 316 Posts

Application Programming Interface (API) is a set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components.

Learn more.

Question Guillaume Lepretre · May 14, 2018

Hello,

In all web services, i need to my get login and token. So with Postman, i tried to call a HTTP request where I put the login/token in the header :

 

I tried to get data from Http request header. The REST APi use %CSP.REST. I tried something like that : 

But it didn't work..

Someone can give me some example or other method ?

Regards,

2
0 1900
Question Kishan Ravindran · Oct 12, 2017
Set httprequest=##class(%Net.HttpRequest).%New()
	Set httprequest.Server="www.intersystems.com"
	Do httprequest.Get("/")
	Do httprequest.HttpResponse.OutputToDevice()
	Do httprequest.Get("/cache/")
	Do httprequest.HttpResponse.OutputToDevice()

The above is the code which i found in this link http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?… 
How do the above code works and can i be able to run this?

Thanks in advance.

5
0 3531
Article Amir Samary · Oct 12, 2017 4m read

Hi!

It is often necessary to run some external command such as a python program or a shell script from inside Caché/Ensemble. There are three ways of doing this:

  • $ZF(-1) - Runs the command and waits for it to finish.  
  • $ZF(-2) - Runs the command and don't wait for it to finish.
  • Using CPIPE device - Runs the command and opens a device for you to read its output or (exclusive or here!) write to its input.
8
1 2702
Question David Crawford · Feb 20, 2018

I'm experimenting with sending large amounts of data in a POST payload to be stored as a stream. However I've noticed that no matter how many characters are in the message, Cache only gets about 32k of them, cutting off the rest. Conversely as expected it can only send about 32k worth of characters in a payload.

Before I get creative, is there a REST message size limit that can be changed? Or is there something else going on here?

Thank you!

9
0 1474
Question Thembelani Mlalazi · Jan 30, 2018

I am trying to write an application that will take some information on the database make a call to the Google API distance matrix and get the information to use with rest of the application without using the ensemble part of the development is this possible and how can I do my communication with the  API from a cache class thanks in  advance

7
0 1447
Question Raouf Besbes · Jan 12, 2018

Hello

I'm in the process of creating a TestClass which simulate a HTTP POST call to REST-based web services and while I am having success, I'm struggling on how to parse out the results to a JSON format

Here is down the code part which concerns parsing the HttpResponse.Data variable into JSON :

3
0 2378
Question Arya S · Jan 5, 2018

Hi all,

I have started using the UPS in my application for shipment and cancellation.

I have the WSDL from the UPS.

I have imported the WSDL via Studio->Tools->addins and finish the process to get the Package implemeted in my studio.

Now the SOAP method contains a URL which is for their live system so i manually changed the URL with their Testing URL.

They are also providing the sample shipment numbers which we can use to test the cancellation process.

I am trying that shipment number to void(cancel) the shipment by call the method.

And i am facing the error as below,

3
0 4927
Question Arun Kumar · Dec 1, 2017

Hi Guys,
Can you please guide me to get rid of this issue. Please find the image files with this post.

Please let me know, before we are developing an API what are all the setup/Configuration(Apache/web server) need to do in my machine. 

If any lead would be appreciated. 

I don't know, in XMLNamespace parameter which URL need to use.  

.

Thanks,

Arun Kumar Durairaj.

3
0 574
Question Seth Rothenberg · Nov 29, 2017

Greetings.

We have one vendor who requires us to send data using TCP

through an SSH port forwarding tunnel that is set up in advance.

UNIX scripts maintain this, and the Ensemble interface uses a TCP Adapter.

I was thinking that Ensemble could maintain the SSH tunnel, 

which would improve our detecting of issues.

Has anyone done something like this?

I see that the  class %Net.SSH.Session has a method ForwardPort,

but it doesn't stand up the tunnel by itself.   Instead, it appears 

to return a handle into the tunnel.     It will work a bit differently.

Thanks

Seth

1
0 516
Question Rubens Silva · Nov 9, 2017

Hello.
We're about to implement an application that could use WebSockets intensely so before we head to that direction we need to figure out about how some few things work. That being said, anyone care to give me some enlightenment?

  • What's the criteria for a new session to be created when using WebSockets?
  • What's the factor for calculating how many licenses to would be used when SharedConnection  is enabled for WebSockets?
  • Is there a way to use session in a way that it would optimize the license usage for a single user?
1
0 351
Question Thomas Li · Sep 26, 2017

Hi all-

We used to have this Java applet in our CSP page to "print all" and "download all" PDF medical reports.  We want this applet so that the user won't have to open each PDF in the browser just to print it.

But now most browsers do not support Java applets anymore due to security concerns, so that Java application is down.  We tried to migrate to Java Web Start but don't know how to invoke the JNLP file from the CSP page.  I am new to Cache so any help would be greatly appreciated.

6
0 977
Article Zhong Li · Sep 25, 2017 5m read

1. Scope and Objective:

Recently we supported a few NHS cases that required TIE (Trust Integration Engine) integration with the PKB service.   Hence this article is meant to be a 10-minute quick guide to describe a demo solution (simple configurations and end-2-end implementation steps) for Health Connect (Ensemble) Integration with PKB (Patient-Knows-Best) service.

0
1 1572
Question Ricardo Baehr · Sep 12, 2017

Hi guys
Im trying to use an API running in AWS API Gateway.
This API is over https and i am using the SSL/TLS config of Caché.

set httpRequest = ##class(%Net.HttpRequest).%New()
set httpRequest.Server = server
set httpRequest.Https=1
set httpRequest.SSLConfiguration = "SSLPadraoAdapcon"

do httpRequest.SetHeader("Content-Type","application/json")
do httpRequest.EntityBody.Write(json)
do httpRequest.Post("/dev/router")

But im getting this error:

5
0 1367
Article Maks Atygaev · Jul 18, 2017 7m read

MonCaché — MongoDB API implementation based on InterSystems Caché

Disclaimer: This article reflects author's private opinion and has no relation to the official position of InterSystems.

IDEA

The idea of the project is to implement basic MongoDB (v2.4.9) API features for searching, saving, updating and deleting documents in a way that will allow the use of InterSystems Caché instead of MongoDB without changing the code on the client side.

MOTIVATION

14
0 1917