Does Using the %REST.API Class work with Swagger OpenAPI version 3? I got an error when I tried it on IRIS 2022.2
ERROR #8738: Correct OpenAPI 2.0 version was not specified: . <$.swagger>
Application Programming Interface (API) is a set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components.
Does Using the %REST.API Class work with Swagger OpenAPI version 3? I got an error when I tried it on IRIS 2022.2
ERROR #8738: Correct OpenAPI 2.0 version was not specified: . <$.swagger>
Hello,
First of all thanks for your help, time, and answers.
We would like to know what are we doing wrong and how could we improve it and fix it.
We need to convert the Api Monitor Metrics which are a String with this format:
iris_cache_efficiency 13449.122
iris_cpu_pct{id="CSPDMN"} 0
iris_cpu_pct{id="ECPWorker"} 0
[...]
iris_wdwij_time 11
iris_wd_write_time 8
iris_wij_writes_per_sec 0
To JSON.
We would expect them to look like a normal JSON as follows:
{
"iris_cache_efficiency": "13449.122",
"iris_cpu_pct{id='CSPDMN'}": "0",
[...]
"iris_wij_writes_per_sec": 0
}
In our previous post, we discussed the motivation for developing a chatbot agent with access to FHIR resources. In this post, we will dive into the high-level design aspects of integrating a Streamlit-based chat interface with a Java SpringBoot backend, and enabling a LangChain agent with access to FHIR (Fast Healthcare Interoperability Resources) via APIs.
Hello,
First of all thanks for your time, thoughts, teaching and help:
We wonder how could we get the metrics from http://[Ip]:[Port]/api/monitor/metrics and use them in Kibana to chart statistics.
We would like to ask you how do you use the api monitor metrics, and as a second question, how would you suggest to utilize them in a third party software as Kibana to chart them.
We have thought to do the following:
Based on the successful solution for my 2nd contribution to the Contest
I used an adapted version for this package. And have some findings I'd like to share.
Multiple communication steps over CPIPE may take time.
You won't recognize it on a fast machine. But a slower box with
Windows + Docker Desktop + your browser (and more) is neither
"Speedy Gonzales" nor a "Road Runner". 🙂
First observation you launch your OS command and see NO result
On the console, you just sit there and expect a reply.
Establishing the Connection to IRIS is a typical case.
Jour redirected Output is just empty.
Hello,
In response to the infrastructure needs of our company's service, I've created a small API that sends SNMP queries to InterSystems to visualize relevant data for retrieval when the infrastructure implements monitoring.
However, I'm experiencing a timeout issue when attempting to collect information using an SNMP walk. Here is the code for my API's SNMP service:
There are situations when your only access to a server is using a web browser,
and there is just no chance of a Terminal or Console access.
The Online Demo Server is such a case.
So you have WebTerminal. That's fine for ObjectScript and Embedded Python.
But my demo is straight Java. And is interactive.
$ZF(-100...) is some aproach. But it's rater batch-oriented and not interactive.
@Enrico Parisi presented a nice extension to WebTerminal recently.
It's close to my own packageWebCommand that I presented a year ago.
In my previous articles, I described my Command Line Extension to NativeAPI.
Of course, this is also available for any other NativeAPI package.
So I created this example as a demo for the actual Java Contest.
The package contains also an IRIS server in Docker for the demo
It is evident that it also works with any remote IRIS server.
You just have to provide it with my NativeAPI CommandLine Extension.
I think this demo is easy to follow and shows the essential features.
Hello, community!
After creating the app IrisApiTester, I saw that it could have more potential, and with some adjustments, it could become a powerful collaborative tool.
I asked myself a few questions::
Hi There,
I am having issues trying to obtain a JDBC driver which is backwards compatible with java 6 for a solution which will call my IRIS instance, I have already logged a WRC ticket which is looking unlikely that there will be any development to create a driver for such legacy tech.
The Java 6 app is end of life, however won't be replaced until after my project goes live, hence why I ask the question.
We are in the age of the multiplatform economy and APIs are the "glue" in this digital scenario. Since they are so important, they are seen by developers as a service or product to be consumed. Therefore, usage experience is a crucial factor for its success.
In order to improve this experience, specification standards such as the OpenAPI Specification (OAS) are increasingly being adopted in the development of RESTFul APIs.
For Compiling
XData VariableName [ MimeType = application/json ]
Error :
ERROR #5002: ObjectScript error: <MAXSTRING>CompileRtns+282^%occRoutine
ERROR #5002: ObjectScript error: <FUNCTION>DescribePhase2+57^%occSysDe
Hi Community!,
I've published a new versión of IrisApiTester, I included some new features:
Still working on my first External REST API call, and I am struggling to find the exact answer I am looking for... I get a JSON response from my API call but I am not quite sure how to dynamically get the JSON response into the Ens.Response Object with its lists of Arrays that I have defined.
set tSC = ..Adapter.SendFormDataArray(.tHTTPResposne,"POST",tHTTPRequest,,,tURL)
set pResponse = ##class(User.REST.Epic.Msg.GetPatientLocationResponse).%New()
set dynObject = {}.%FromJSON(tHTTPResposne.Data)
set iter = dynObject.%GetIterator()
while iter.%GetNext(.key,.value){
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)
In my previous articles, I described my Command Line Extension to NativeAPI.
Of course, this is also available for any other NativeAPI package.
So I created this example in Python as a demo.
I have a problem. Occasionally, I am getting locked out of IRIS because of password failures. However, the failures aren't necessarily related to my password. We are using VSCode, and I have installed one or two proposed APIs for use with the software (because that's just how I am; I want to learn the new stuff).
Today, I had that problem again. The step that caused the problem was most likely when I was trying to switch the branch I was using and updating within VSCode. Let's say I was switching from branch "1A" to branch "2B". When I did this, IRIS caught two password errors:
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'.
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?
Trying my first REST call operation to our internal EMR (Epic) server, and I am receiving "ERROR #6097: Error '<READ>Read+28^%Net.HttpRequest.1' while using TCP/IP device '9999'" when I attempt to test my operation. When I look up the General Error Messages for 6097 I am seeing...Error '%1' while using TCP/IP device $zu(189,1)='%2'. What does this mean?
I am trying to connect to the server over port 443 which is HTTPS but I am not using an SSL Configuration. Could that be the issue?
Is there a way to debug HTTP like their is with the ISCSOAP log?
I had attempted to create a REST Operation before but did not have success. As I am going through the Tutorials and Documentation everything references REST services, but I have a case where I want to create a REST Operation that makes Epic API calls against Interconnect. I have done SOAP operations before and we currently have one in our Production Namespace, but from what I understand SOAP has the wsdl which defines al the structures and etc, where REST does not.
I am playing around with trying to make an Epic REST API call from an operation, and from what I understood because the request has to be sent as POST, I need to send the request as JSON. However when I try taking the request and running %ToJSON against it for the payload to be created I am getting an error...
ERROR <Ens>ErrException: <METHOD NOT SUPPORTED>zgetPatientLocationByVisit+6^User.SCOTT.REST.APIOperation.1 *%ToJSON,osuwmc.Epic.Access.Request.GetPatientLocationByVisit2JsonRequest -- logged as '-' number - @' set tPayload = tRequest.%ToJSON()'
Hello Community!!
I just upload my lastest application "IRIS Api Tester" to the Open Exchange.
It's a docker project with InterSystems IRIS + Newman that will allow you to test your Postman Collections in a quick and easy way..
It's ready to work out of the box, you just have to clone the repo: https://github.com/daniel-aguilar-garcia/irisapitester
Run the docker-compose file:
Open this url in your browser:
http://localhost:52773/csp/user/index.html
Add some test to your Postman collection:
Hello Community!
I'm going to try to explain how to create test for Postman collections for use it with my app IRIS Api Tester.
Yet, What is Newman?:
Newman is a command-line tool that allows you to run Postman collections in an automated and scalable way. By creating tests in Newman, you can ensure the reliability and correctness of your API endpoints. In this article, we will explore how to create tests for Newman in Postman, along with practical examples to help you get started.
Once you have created your Postman Collection:
You're ready to start writing your test scripts:
In this article, I will share the theme we presented at the Global Summit 2023, in the Tech Exchange room. Me and @Rochael Ribeiro
In this opportunity, we talk about the following topics:
As we are talking about fast modern APIs development (Rest / json) we will use two Intersystems Open Exchange tools:
API performed API Automation on IRIS Dataplatform?
Using the Config.Configuration class and SYS.Database class methods, you can create and register a namespace database from the terminal.
Below is a series of execution examples that create database file /CacheDB/AAA/cache.dat and register database AAA and namespace AAA in the configuration file (cache.cpf).
* Execute in the %SYS namespace. *
* Make sure that this script runs as the user that is used for all IRIS processes to ensure that the directory has appropriate ownership and permissions *
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
(data)
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Here's what i'm trying to do in IRIS:
On this GitHub you can find all the information on how to use a HuggingFace machine learning / AI model on the IRIS Framework using python.
Usage of Machine Learning models in IRIS using Python; For text-to-text, text-to-image or image-to-image models.
Here, models as example :