I am relatively new to ensemble, but I am trying to build a REST operation using the enslib.Rest.Operation but I can't seem to get it to work at all. I am completely at loss here because the errors I am receiving are very unclear. I have tried a few different variants using PostURL and SendFormDataArray but I got errors on all variants. Suggestions are welcome.

0 2
0 991

Hi everyone, I have and Zen Mojo application, it's all working but I have some doubts about what is recommended to use: There is some reports of employees, for example, and actually I'm using some plugins : "Excelent export" to generate Excel reports and "jspdf" to generate PDF reports in client side.

I have an REST service, that receives the request, process and returns JSON, after client side receive the response it's processed.

- This can be slow/bad in applications with large data?

- It's better/recommended to use ZenReports even with ZenMojo applications?

1 2
0 359

Hi,

I have Healthshare/Ensemble version 2015.2.1.

I created Business Operation in my ENSDEMO namespace that will connect to an external REST endpoint to send data to this external REST Service.

I also created an http service in Home>Healthshare>Service Registry, under the Service Type: http. I entered the REST endpoint Name, Host, SSL Configuration, and URL.

0 1
0 618

Hi-

Im curious if there is any specific configuration that has to be done on an IIS web server to serve up RESTful web services.

I have a server that has IIS installed, with the CSP gateway. a second server that has Cache installed on it.

I have configured a web application using the Cache System Management Portal for the web services that has a dispatch class pointing to my dispatch class.

I have created an application mapping in my CSP Gateway Management Portal on the web server such that url's with /webservices prefix are routed to my cache server.

0 1
0 3.5K

I'm currently re-engineering an application from CSP pages directly accessing COS Methods, to an Angular/Material front end accessing a REST DAL. Both the Angular front end and REST services are hosted from the same Caché instance and the same namespace, but the REST services have their own CSP application, with all calls being routed through a Dispatch class.

0 5
0 506

Hi,

I am working with this Ensemble Business Operation, which extends the EnsLib.Rest.Operation.

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

I built the OpenWeatherMap Rest Operation described in the article above.

I would like to access the weather.id weather.main, and weather.description. However, these objects are in a JSON Array.

How do you access these three objects in Objectscript.

0 3
0 928

Hi all (and specifically Eduard L. ;)

The Ensemble Workflow REST API provided here:

https://github.com/intersystems-ru/EnsembleWorkflow

(and mentioned before in this Community, also as the basis of the Angular UI, also available in the same Git)

Has some very basic documentation as to how to work with the API (which also seems to be possibly a little out-dated as I think the /login URL is deprecated, for example).

Is there somewhere a more comprehensive documentation of this API?

1 3
0 578

Hi,

I was looking at the ENSDEMO namespace in our Ensemble server. In the class Demo.REST.DirectoryOperation, there is a line that uses the macro $$$URLENCODE. I would like to know exactly what does this macro $$$URLENCODE() do. Specifically what value does it. Unfortunately, I can't find anything about this macro in the Ensemble Documentation.

0 2
0 1.2K

In this article I would like to present the RESTForms project - generic REST API backend for modern web applications.

The idea behind the project is simple -after I wrote several REST APIs I realized that generally, REST API consists of two parts:

  • Work with persistent classes
  • Custom business logic

And, while you'll have to write your own custom business logic, RESTForms provides all things related to working with persistent classes right out of the box.
Use cases

  • You already have a data model in Caché and you want to expose some (or all) of the information in a form of REST API
  • You are developing a new Caché application and you want to provide a REST API
12 23
3 5K

We tested REST Services as described for Caché DocServer example and for requests using http protocol it works without problems. However when we use the https protocol for the same REST Service it is not available. Our infrastructure is as follows: Apache with openssl, which works on the other hand well for CSP with https. If we switch on the web gateway http trace facility we could see the request of CSP pages by https://... but again a request of a REST Service by https:// will not result in a entry in the tracer. We hope that this description of the problem is understandable.

0 1
0 710
Question
· Nov 7, 2016
Binary Support in JSON?

I'm working on a REST service which will include a binary stream as a request property. I'm currently encoding the stream as BASE64 and passing it as a string value, but I was wondering if there is anything in the Caché JSON support that may be a better fit for encoding this data? Thanks Chris

1 3
0 835

Hi everybody,

I created my own REST service class by extending EnsLib.REST.Service.

In some particular conditions of the parameters of the request, the REST service should respond to the client with an HTTP status response code 400 "Bad request".

I read the article "RESTful Exception Handling " and I try to use the suggested:

do ..ReportHttpStatusCode(400)

But the server seems ignore it and get back to client the 500 http response code.

Any suggestions?

0 3
0 1.4K

This is a beginner’s guide to the design of a “MicroService” implemented in Ensemble. “MicroService” is a popular phrase these days which has a broad interpretation. My interpretation is: “MicroService” is a “NoSQL Service”. A what? The answer is in the article.

We learnt what the difference is between SQL and NoSQL databases. For me the difference is nearly the same between a SOA Web Service and a “MicroService”. I am going to explain it through an example.

1 0
0 887
Article
· Oct 12, 2016 12m read
RESTful API

Beginner’s guide to RESTful Application Program Interface (API) design and documentation. Through the example you will learn some common pattern for RESTful API.

Before you read

You need to know

3 0
0 3K
Article
· Oct 7, 2016 4m read
Forwarding Requests in a REST Service

One useful feature of our REST framework is the ability for a dispatch class to identify request prefixes and forward them to another dispatch class. This approach of modularizing your URL map will improve code readability, enable you to easily maintain separate versions of an interface, and provide a means to protect API calls that only certain users will be allowed to access.

7 1
0 3.6K
Article
· Oct 6, 2016 4m read
RESTful Exception Handling

A beginner’s guide to Exception Handling in RESTful web services. The article gives an example how the various error conditions during processing a service request can be handled.

We expect our client – server communication working in a flawless operational condition, running error free software. But we are prepared to handle exceptions. Are we? So far in the examples of the previous sessions were not. We did not care about exceptions. The result? In any error incident it took ages to figure out what the problem is and more importantly how to fix it.

3 1
0 1.7K
Article
· Oct 5, 2016 13m read
RESTful way of data transfer

This article gives a brief introduction how a RESTful service consumer and a RESTful service provider exchange data. It is a beginner’s guide. Data is transferred from a consumer to a provider as parameters of the service. Parameters are part of a service request. The result of the service action a response is returned from a provider to a consumer. Both the service request and response are standard HTTP messages. Since HTTP is a flexible standard regarding to the message contents, RESTful services also enjoy the versatility of data transfer methods.

3 0
0 4.4K