I am trying to return a stream soap response using web services I can call my web service supply it with a xml string which works fine . I then work on that XML and try to return a Stream but all works in the production when my service receives the stream after I get the error as if its trying to copy stream to a variable and I am confused as to where that operation happens.

0 3
0 735


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 315

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)



Quit 1

How do Access the foreign key in JSON() data

0 7
0 248
Chris Stewart · Jun 9, 2016
REST Services Cataloging

I've been building up a REST services API, consisting of a dozen or so classes referenced from a Dispatch class, which has route mappings for the first piece of the URI. I'd like to have the Dispatch class be able to output all of the available Services, with some documentation. Is there something like a %Library resource that I could use to pull this information from each of the classes?



0 7
0 741


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 926

I am trying to design a RESTful service that takes a string (with control characters). Does something with that in the logic on the server, then returns a string, which may also have control characters.

Basically the string is a pharmacy claim in a delimited format that uses control characters for those delimiters. The logic on the server will pull the entire claim apart and process it.

I was thinking that a GET method could be uses but I'm used to sending content in JSON format and wondered what other normal RESTful ways there were to do this.

0 4
0 672
Ralenaa Kutkarska · Apr 5, 2019
REST and CSP Sessions


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 397
Eduard Lebedyuk · Oct 12, 2019
How do you search with REST

The question is pretty much in title. I'm developing a REST API, it has a search endpoint with 10 optional parameters. How do I pass them and stay RESTFul?

To ease the question a bit let's agree that:

  • all parameters are AND parameters, user can't make combos, ORs, etc. User can only provide values
  • all values are integers so I don't have to think about URL limits
  • all values are atomic
  • all conditions are about equivalency

Some options I know of:

1. URL parameters.

0 9
0 1,309

Hi All,

I hope someone can help me with the following, it's about the usage of the class EnsLib.HL7.Service.HTTPService.

Working situation right know.

In IIS we've got a site configured who is dealing with the client certificate, etc and redirect the full request to http://localhost/csp/healthshare/NAMEPSACE/EnsLib.HL7.Service.HTTPServic... and the web gateway redirects the request to Business Service 'EnsLib.HL7.Service.HTTPService.cls'.

0 2
0 276

Hello All,

I am just wondering if there is any inbuilt function or utility available in IRIS to clean up "null" elements from JSON e.g. I want to remove "null" elements from payload below before I do any processing with it.


recipients: [

{ "name":"Utsavi", "email":"utsavi@gmail.com"},

{ "name":"Utsavi 1", "email":"utsavi1@gmail.com"},

null, null


content:[null, {"title":"Test.pdf", "data":"ygwehfbnwfbhew"} ]


Thanks & Regards,

0 10
0 295
Chris Paraskiv · Mar 20, 2017
AWS API calls

This question is about calling AWS REST APIs. Based on:


AWS requires REST clients to call their APIs using Signature Version 4 which in case you don't know what I am talking about is a pain in the neck. Here comes the question:

Has anybody, by any chance implemented the v4 signing alg. in COS? If yes, would she or he have the kind heart to share?



0 11
0 942
Alex Goncharov · Nov 6, 2017

Hello, evrybody, I'm writing one project using CSP("OnPreHTTP"), and also REST angular. At the beginning I wrote purely on csp, then I decided to use angular for the flexibility of the client part. Now I can not design logging, I created a table App.Log with properties

0 3
0 511
Bob Felbol · Apr 20, 2018
Special Character API


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: =?Á
ÔºQZéýNÕ V{C?óò?b¢?éÍ )$
²5Å?wEë? ??©tÖã1z×2FëÊnôeË æ??]Zßq ܺ?á

Help me.

Thank you

0 8
0 362
Thembelani Mlalazi · Dec 3, 2018
Rest return 500 error

I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on.

0 2
0 355
Larry Pinsky · Oct 21, 2019
How to send a file via JSON

I have a text file that I pick up in a Business Service and need to send it to our vendor via JSON. I assumed (probably wrongly) that I could just create a RESTful Business Operation, plug in the server IP and URL as well as complete some of the other fields on the BO to send the file. When I do this, I get the following error:

0 4
0 584

Hi all

Does anyone have an easy way of reading the cdata in the xml response returned buy a Webservice?

At the moment I have a XML class and then I use read.Correlate() to read through that XML bit.

However, depending on the message I have different things in the CData and I don't want to create a class for each one of these.

The API returns the cddata as KeyValueOfstringstring.

0 4
0 331

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 236

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 221