Question
· Nov 5, 2021
ERROR #9406

I'm trying to send a POST request to my REST API and I'm getting this error and most likely due the lack of experience, I have no idea how to fix this issue:

"error": "ERROR #9406: Unexpected format for value of field, AlertText, using class base mapping",

"id": "JSONImportError",

"params": [

"AlertText",

"class base"

]

Am I missing something from my string definition?

Defined below as:

0 4
0 317

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

I need to pass a parameter string that contains slashes to a REST call.

I tried URL encoding, or making URL map to accept query parameter instead of path parameter but apparently we only allow for path parameters.

I can come with several workarounds, but these involve some transformation at client and then on server, but I'd prefer a direct support.

Q1: is there any Cache specific trick to pass slashes in path parameters

Q2: are we going to support query parameters in REST?

something like this would help:

0 18
0 43.4K

I have an interoperability production that functions as a FHIR proxy. I have a need to add an HTTP Header value to the outbound request. I've subclassed HS.FHIRServer.Interop.HTTPOperation, but I cannot find a way to add an HTTP Header to the request. The HTTP class used in HS.FHIRServer.Interop.HTTPOperation is HS.FHIRServer.RestClient.HTTP. That RestClient class does not seem to expose or allow modification of the actual HttpRequest.

0 3
0 278

I am working on an angular applications and build a web application (Rest API) on IRIS for health, the web application uses a password authentication and setup with the default csp session time out (15 minutes). If the user make an REST API call from the angular application after the session expired, it displays a login prompt...is that anyway that we can disable the login prompt and just simply return http status 401? When the angular application received the status 401, it can redirect to angular error page.

Thanks,

Hoi

0 5
0 344

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

I have a vendor that is sending an HL7 message. But when I asked for more detail about their mapping tables, they told me they typically don't supply that but supply an API for customers to call so they don't have to define tables and it is more dynamic.

So with that being said I am creating my first REST operation. I understand the gist of how a REST operation works in working with other types out Non HL7 Operations (SOAP, SQL) before. You send a request and get a response back, that part I understand.

0 14
1 603

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

Hello,

I am trying to figure out if we can extend a business process in IRIS. My Use Case is that I am developing RESTful Interfaces and my each REST Interface needs to go through certain processes before getting to the actual action.

e.g. I have 2 REST Interfaces, GetPatient and GetEncounter. Both of these need to invoke "GetToken" Business Operation to go to the Authentication server to get an authentication token before they go ahead and hit the Business Operation to Get the data i.e. Patient or Encounter.

1 1
1 185

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 All,
I am implementing REST API's in IRIS using the below link as a guide.
I chose this approach so i could have a single entry point for requests regardless of namespace

https://community.intersystems.com/post/restful-exception-handling

a sample form the HIHLib.REST.Server class i am using is below. my question is does IRIS and CSP cache responses for requests to the CSP.REST class?
and if so what parameters or properties do i need to enable?

0 2
0 405

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