It is clear how to get the request header value with a specific name:

Class My.RestController Extends %CSP.REST
{

ClassMethod processRequest() As %Status
{
    #dim request as %CSP.Request 
    set request = %request
    set h = ##class(%REST.Impl).%GetHeader("...")
    ...    
    return $$$OK
}

But I can't figure out how to enumerate ALL the request headers (and also get all values).

1 7
0 340

Dear,

I'm trying to configure a new interface that reads HL7, transform them into FHIR messages and then send POST or PUT or DELETE depending on HL7 doc type.

1-I added an HL7 TCP service that reads ADTs messages

2a-Send ADTs to a process to transform them into SDA (using the following command: do ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(request,.con))

2b-Extract the patient MRN and add it to the AdditionalInfo property (using the following request message class: HS.Message.XMLMessage)

1 5
1 64

Hi everyone,

This is:

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 736U) Fri Sep 30 2016 12:25:56 EDT

The server is on RedHat Linux while the browser is running on Windows (Firefox).

I am helping a partner build a complex modern HTML5 web application that talks with Caché using REST calls. They have been using %CSP.REST very successfully. Security works great as well.

1 11
0 9.2K

I am trying to use postman to start the restapi classes from a json openapi2.0.0 file.

POST: https://myserver.com/api/mgmnt/v2/requestAPI. The body contains the openapi2.0.0. The application api/mgmnt has in security settings: password. JWT is not selected. I set postman authentication to basis authentication and gave username and password. I also set in headers IRISUsername and IRISPassword. I have 401 Unauthorized.

Is the only way to go through is to build an oauth token? or do I miss something?

1 3
0 75
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
Question
· Feb 20, 2018
REST Data Limit

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!

1 9
0 1.1K

I have a Enslib.REST.operation which I want to use to send a JSON message. In Ensemble I am using the request message to the Business operation as an input for ObjectToJsonStream function so I can send it out (this is the way to go right?). However, I am now running into the fact that one of the attributes (template_name) contains an underscore and that I am not allowed to use the underscore to define the property in my ensemble RequestMessage:

Property template_name As %String;

1 1
0 359

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

Referencing this post:

https://community.intersystems.com/post/producing-json-sql

I'm not sure how to actually interact with the result set I get from doing something like this. I want to return something like:

[{"field1":1, "field2":2}, {"field1":2, "field2":10}]

I'm finding it very difficult to get it in this format, since %Print appends a newline onto the end of the {} object it prints.

Here's the closest I've gotten:

1 5
3 1.2K

Hello Team,

please can someone help me in the below.

I'm trying to call a Rest API below specification working in postman, and receiving perfectly the response:

POST /PharmacyServices/api/Pharmacy/Upload?Key=aaaa&Username=bbb&Password=ccc HTTP/1.1
Host: abc:38440
Content-Length: 240
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="File"; filename="///xxxx/POC/CSV/20230607.csv"
Content-Type: text/csv

1 1
0 253

I have an Ensemble installation and just build my first RestService (using %CSP.Rest that forwards them to my Business Service). This works nice and fine when I use postman to make REST calls over http (port 57772). However when I attempt to make a request using https over port 443 I receive the following error:

1 7
0 857

Hi,

I want to create a table with a dynamic display of data using the DataGrid.

On the page there dataCombo and the table.

According to the plan, when the user selects an item in dataCombo the table is filled with data. If select another item - data is updated.

But in fact, the data in the table are loaded once when the page is loaded, and when I select value in DataCombo, I receive an error:

0 1
0 399
Question
· Jul 17, 2017
Connecting to a web service

Hi,

I am new to coding web services and trying to connect to an API that returns its format in xml or json.

I have a class as follows.. when I run I get back a 6059 in my status - Unable to open TCP/IP socket to server

Can someone help me identify what I am missing? Thanks

0 12
0 2.7K
Question
· May 4, 2018
How to use MS Exchange wsdl

Hi

We are trying to create a new operation wich gets a XML message and send it's contents in an email.

We've used the SOAP Wizard to generate the Proxy Classes but now we are a bit lost...

What we are trying to achieve is to Create appointments in a Outlook Calendar and send emails.

0 3
0 337
404 Not Found

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "notFound",
   "message": "Not Found"
  }
 ],
 "code": 404,
 "message": "Not Found"
 }
}

I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?

0 1
0 2.5K

Is there any good documentation/tutorials on creating gateways in both directions between FHIR and Hl7v2 (for Health Connect)?

the scenarios I'm most interested in

1. Client application sends a FHIR demographic query to Health Connect - and the interface has to convert this to Hl7v2 QBP^Q11 message to the PAS.

2. Health connect sends a PDF document (from a file or HL7v2 interface) to an EPR over FHIR.

Thanks

Stephen

UPDATE

0 5
1 1.1K