Do you have any experience / recommendations / best practice on how to update server-side data residing in a Cache database via a REST service?

A naïve approach would be to send a full JSON representation of the data object via an http POST to a method on a REST handler class:

<Route Url="/mydata/:id" Method="POST" Call="Update"/>

The problem I see here is, if only one of the data object's properties has changed, how do we know which? Or do we simply overwrite all properties?

0 3
0 530

Hi everyone! My company has a Zen ERP application with CSP delegated authentication. Now, we're developing a separated BI application, using Angular, which consumes DeepSee REST API services. Both applications access the same Caché database.

How to implement single sign-on strategy in order to allow an already authenticated ERP user to access DeepSee REST services? Has anyone already implemented something like that?

Thanks in advanced.

0 3
0 529
Question
· Apr 5, 2019
REST and CSP Sessions

Hi!

We are using Rest Service with inheritance of %CSP.Rest, and we are having the following problem: when we receive 100 request from single IP adress - this creates 100 CSP sessions and takes 100 user licence for each request for few seconds. What can we do do about this? We've set this parameter:

Parameter UseSession As Integer = 1;

Thank you in advance!

0 3
0 529

Hello All,

I am compiling a REST Operation to call our hospital Administration system, following tutorials around the REST API's etc. First time we have integrated like this so not much knowledge around our hospital - hoping someone on here can help.

I have been using the JSONStreamToObject Method which is working as i expected, apart from trying to get a specific item in the example JSON Response as follows:

{"test":"abc","name":[{"use":"usual","family":"Matest","given":["Mia"]}]}

0 2
0 520

Does developing a RESTful API in Caché remove the requirement to use the InterSystems.Data.CacheClient.dll and generate proxy classes using the Caché Object Binding Wizard for .NET web development? If anyone has links to sample applications using .NET with Caché and REST Services, I would be grateful if you could share them.

0 4
0 511

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
Question
· Jul 25, 2023
REST API Request Logging

I am working on my first REST operation to send a API Request to an internal server within our Network. I have finally got past the point of being able to connect using a SSL/TLS Configuration, but I am getting a ERROR <Ens>ErrHTTPStatus: Received non-OK status 403 from remote HTTP server: 'HTTP/1.1 403 Forbidden'.

1 16
1 496

Given I have a property

Class All.AllBooks Extends %Library.Persistent
{

Property ID As %Integer;

Property Title As User.Book;

}

In the class method

ClassMethod GetABookById(id As %Integer) As %Status
{

SET MyBooks = ##class(All.Allbooks).%OpenId(id)

SET obj = {

     "ID" : (MyBooks.%Id())

     "Title" : (MyBooks.Title)

}

WRITE obj.%ToJSON()

Quit 1
}

How do Access the foreign key in JSON() data

0 7
0 483

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,

0 3
0 481

I am trying to connect the external application. Authenticating via Two SSL,

I have the Client Cert, Private key and the Root Certificate

The connection is successful from local (both via terminal and as well via Postman)

But when trying from IRIS application by configuring the certificates in the SSL configuration, i am not able to successfully verify the SSl connections

When test from the ssl configuration with the endpoint and port its gives the error Error #988: SSL connection failed. SSL/TLS error in SSL_read(), SSL_ERROR_SYSCALL: I/O error (54)

0 7
0 474
Question
· Nov 19, 2018
JSON Syntax

Hi,

I'm using InterSystem Cache v2015.2.5 and I'm implementing a REST API and returning JSON.

Following the documentation I see examples like this

Set obj = {"destinations": ["London","Madrid","Tokyo"]}
Write obj.%ToJSON()

However, I have a compilation error

ERROR #1054: Invalid expression : '{"destinations":'

Is there something that needs to be enabled on Studio to allow this syntax?

Thank you,

Rui

0 5
0 470

Hi All,

Actually, I'm developing few restful API's. I want to create a authentication tokens and display it on my login restful API. If I'm using CSP sessionId, how can I validate the session Id's in another or continues restful API's. else, is there any other approach to handle this task.

My Primary goal is, I have to integrate 2 different front end applications. One is Zen framework another one is web pages from Python.

If any lead, it would be appreciated.

Thanks,

Arun Kumar Durairaj.

0 1
0 465

Hi All,

I am trying to get JSON data from a REST api. I am using my web browser to get the data by hitting the URL.

The data is receiving properly, but the JSON contains a few HTML tags.

These tags are not not receiving in the browser while hitting the url. Is there any way to overcome this issue ?

Thanks,

0 2
1 462

Hello Everyone,

We are currently in process of implementing REST APIs using IRIS and we are also looking at using Intersystems API Manager.

Our aim is to implement a Microservices Architechture where Services are small in size, bounded by contexts, autonomously developed, and independently deployable.

We are following a spec first approach where we are first defining the API specs into Swagger Hub and using IRIS API Management Service to build the REST classes i.e. the Specification class, Dispatch class and Implementation Class.

0 8
0 461

Hi,

So I am a front end developer working with REST API with Cache database on the BE. The BE guys are currently using Cache through a Windows virtual machine and they claim it is not possible to have a development server to work with. All the work they are doing is directly on the production server and changes are immediate and I think this is a bad idea going forward and we most definitely need a development server that has access to the same code base and different version (through git) to be able to do development. We also do all the testing on this production server with test accounts, but we cannot do automated testing with this setup.

0 11
0 461

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