FIrst of all thank you for your time in reading this question and writing a response,

We would need some help,

-> Our objective is to control which method is being used in the service: GET POST PUT

We have tried to understand the example REST Service: Demo.REST.DirectoryService

After that we have tried to create our own custom rest service,

please take a few minutes to examine the following code:

0 12
0 315

Hi everyone - In IRIS we would like to arrange the access of two users in such a way that each has access to exactly one (his) database only. Which resource does this (%DB_%DEFAULT allows each of the two users access to both databases). If you create new resources (%DB_Database1 and %DB_Database2) and then add them to individual roles (each for the user to), the access for the users, for example, via a REST client does not give the desired separation (instead once Ok, other database 401 Unauthorized both OK).

0 2
0 281

Recently i've been using Restforms2 to create a CRUD API for a project. But it lacks some advanced functionality that we need, so we have created a production with a REST WS which handles those advanced methods. That works great but there's a drawback, it does not have authentication.

I would want to use the same authentication method as Restforms2 which is a basic auth using IRIS users and passwords.

0 4
0 451

I have tried many methods from super classes of %CSP.REST but I can't find a method I can override that will run after the %response object is created so I can set a header that is common to each implementation method. It's one line of code in each method to set the header but it would like to make it super easy, simple and just have a method that runs on, before, after the implementation method to set this common header (we want to return the API version in each responses HTTP headers.

0 2
0 115

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
Question
· Apr 20, 2018
Special Character API

Hi

Made a request for API REST.

Using HTTP Request adapter.

Adapter As EnsLib.HTTP.OutboundAdapter

Outside the Ensemble an API response is JSON (CORRECT)

Answer in Ensemble: =?Á
Â0
?_eä,cÒ
'=
*^<YÙF¡í$í¼ÈÞÝt
oÉ÷ý$?|
¤1¡{Dâhà°Ý?Öù)2ós??R?¸¼?ºd?$,ñD+»??
?
ÔºQZéýNÕ V{C?óò?b¢?éÍ )$
²5Å?wEë? ??©tÖã1z×2FëÊnôeË æ??]Zßq ܺ?á

Help me.

Thank you

0 8
0 420

Hi Guys,

I have a DB server (ser-app-db) where IRIS is installed as server.

I have a Web server (ser-app-w) where IRIS is installed as web server and configured as CSP gateway.

I followed the configuration guide and ser-app-w perfectly display the CSP and CLS pages.

But that's not working for my REST service, for exemple with the REST sample:

http://ser-app-db/REST/CRM/Get?ReqID=123(GET): work and show the request

0 3
2 1.1K

Hi,

I've added a REST service which worked fine on our test system but failed on the production environment because UnknownUser does not have %All set and I really don't want it set on production (in fact I've also switched it off on test).

Is there a way to allow a single REST service to have unauthorised access?

I was thinking adding a resource/role to UnknownUser specifically for that service but I've never touched on Users/Roles/Resources so I'm struggling to work out what needs adding where.

Thanks

0 2
0 252

I'm trying to setup a REST server with CORS support. I have created a class that handles a specific part of the service (printer control). This class I have referenced in my main REST class by adding <Map Prefix="/print" Forward="myClass.PrintAPI" />

My main class does have its own <Route>s and handles CORS requests perfectly. But in my subclass OnHandleCorsRequest() is only run when requesting from same origin and never run when making a CORS request. I have set Parameter HandleCorsRequest = "true" in both my main REST class and the subclass.

0 4
1 318

Hi,

I don't found how to get params send by a GET REST query (not in url but by request param).

this is config of the call in postman

I try to get %request.Data, doesn't work : Data is undefined

I try to get %request.GetCgiEnv("Data"), doesn't work, return ""

I do ZW %request and see that my parameter is present in cgi parameters, but I don't now how to access it.

0 9
2 308

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,
Trying to work with REST protocol, using IIS 8, both client and server are Cache servers,
I have the following problem-
When I send a PUT command, I get the following error:
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>

0 2
0 894
Question
· Sep 14, 2018
REST POST 405 error

I'm testing out the new %CSP.REST way of creating an api and having a problem with a POST getting a 405 error.

I get data returned when I do a GET, so I don't think it's a configuration issue or a class issue.

I have no problem with %CSP.Page when creating a REST type method. So what am I missing?

Can someone give me some advice?

Thank you.

0 8
0 426

We have a Cache database in Azure, and want to expose it as an OData source (link).

My first attempt was to use Microsoft's Visual Studio 2017 and Entity Framework to create the data models...but it seems as if EF and Cache don't work together. (I do have those instructions from 2013, but they don't work. (See other post. Best answer seems to be "migrate to IRIS 2019.1.")

Is there any other form of OData support?

0 1
0 625

Hello community,

I have a very simple REST API connection doing a POST of JSON messages via AZURE APIM.

It worked successfully for few weeks until a day ago when i started receiving a bad response as below.

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><meta name="format-detection" content="telephone=no"><meta name="viewport" content="initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><script type="text/javascript" src="/_Incapsula_Resource?......................................

0 2
0 373

Does anyone know if I can create an API integration, from Ensemble to Salesforce? What I would like to do is trigger a Salesforce case to be opened when for example a Queue reaches a predefined threshold or an interface connection goes from green to non-green.

0 1
0 386