Hello,

I am trying to find out if it is possible to decode the Azure access token in IRIS. Has anyone ever tried this before? I need to decode the token to extract the "Scope" details in order to verify the scope to make sure client is permitted to do the request they have done.

If you could point me to any information, that'd be great.

Thank you.

Utsavi

0 7
0 586

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

I am trying to use the automated unittest class for a %CSP.Rest service.

So my Unittest code set's %request and %response from %CSP.Req/resp respectively

I build a tProxy with the fields I need for the post and set it %ToJson... I have tried seting %request.Content = tProxy (and not)

I call the method for the post url directly...

When that method calls %fromJson to set an object with the info. I passed...

- when I don't set %request.content.. I get a error '5035 - premature end of data code 12'

0 7
2 1.1K

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

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
Question
· 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?

Thanks

Chris

0 7
0 790

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

When manually coding REST services and using GET /api/mgmnt/v1/:namespace/spec/:application/ to return an OpenAPI spec, how do you specify supported properties (OpenAPI Properties in Use | Creating REST Services | InterSystems IRIS Data Platform 2021.1) like responses, definitions, and information in paths like summary and description?

0 7
1 257

Hello to all,

I'm trying to post some form data from a form I made in React to the backend of cache fetching a REST-service.
Receiving and processing a JSON-object is no problem but how can I handle Form Data?

The frontend is sending the form as form data and also includes one or more files.

What is the easiest way to process this data in my REST.Broker- class?

Best regards,

Simon

0 6
0 440

After some trials, I am comfortably on my way developing spec first REST APIs using /api/mgmt/, OpenAPI 2.0, testing with Postman.

My question is related to scaling up.

Assume these things:

- Our software is CSP web app and it's web application is '/csp/application'

- I created a new REST enabled web app called '/csp/application/v1' and for my first API I created a spec that defines an endpoint /getTeapots so the endpoint is localhost/csp/application/v1/getTeapots

- Using the /api/mgmt/ endpoint, I loaded the spec into API.TeapotLibrary

0 6
0 399

Hi.. I have an issue where we are using OAuth2.0 with the ZAUTHENTICATE routine. Once our token is validated we are using a users lan id (passed on the ID token) to find a software defined username in a Cache Global.

That is all working fine in ZAUTHENTICATE.. I am setting the software defined username in the Properties("Comment") array and wanting to reference it in the Rest Service Dispatch class.

0 6
0 776

Hello everyone!
I have to build a REST service that receives a POST HTTP-request, collect a file from that request in the Form data and then send it in another HTTP Post request through Form Data. However I can't really seem to send the file, and I do not know where it has gone wrong. All I am getting told is that no file is being received from my HTTP Post request. I am reaching the REST Service I am supposed to send the request to, but nothing is being sent.

0 6
0 282

Good afternoon - I am in the process of writing a AngularJS front-end for some CoS functions that my integration team uses for auditing, analyzing and various other purposes. I have re-tooled the functions to return JSON results that AngularJS can then interpret and display. Many kudos to the AngularJS series on this site for giving me a jump start.

0 6
0 643

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