Recently i've been using Restforms2 to create a CRUD API for a project. But it lacks some advanced functionality that we need, so we have created a production with a REST WS which handles those advanced methods. That works great but there's a drawback, it does not have authentication.

I would want to use the same authentication method as Restforms2 which is a basic auth using IRIS users and passwords.

0 4
0 477

I am trying get the Unix time stamp in milliseconds

set epochSecond= $ZDATETIME($ZTIMESTAMP,-2)*1000

but the result is not accurate as $ZDATETIME ignoring /truncating the fraction of the seconds and the milliseconds calculation is not accurate with fraction seconds

for example

set epochSecond= $ZDATETIME($ZTIMESTAMP,-2)

1675830682

when its converts to the milliseconds

it became 1675830682000. not the accurate fractional seconds.

My target system looking for the milliseconds time stamp to authenticate.

0 3
0 277

Hey Developers,

Enjoy watching the new video on InterSystems Developers YouTube:

Introduction to AutoML @ Global Summit 2022

https://www.youtube.com/embed/X6Ji9x-y8x8
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

2 1
2 262
Article
· Feb 7, 2023 5m read
IRIS quick query service idea sharing

Hello, friends who are developing IRIS. I recently participated in the InterSystems Developer Tools Contest. This time, I made a tool based on the idea described in an article I published earlier as a template for quick query of messages. Currently, you only need to establish entity classes in IRIS, Then record the message corresponding to the entity class in the specified lookup table, and all the key fields generated in the message can be inverted indexed (the concept in ElasticSearch), which is convenient for quick query. The following is the design idea of my program.

1 1
0 182

Listen to CEO George James chat with Derek Robinson, host of the InterSystems DataPoints podcast talk about source control, developer tools and how our solutions are beneficial for InterSystems IRIS users.

 

In this short 17 minute episode, George and Derek discuss our work with developer tools, and how choosing the right source control can provide users with a seamless solution - which is why Deltanji is seen as the go-to source control for InterSystems IRIS users.

Listen now on the InterSystems website > https://bit.ly/3Jp5py5
or wherever you get your podcasts - just search for 'InterSystems DataPoints'.

3 0
0 144
Article
· Feb 7, 2023 9m read
OpenAPI Suite - Part 2

Hi Community,

In the first part, we describe all packages, used libraries and REST services.

Now, I would like to add some details about converter and validator services.

By default, OpenAPI-Suite sends an HTTP request to converter.swagger.io if the specification version is less than 3.0 and another HTTP request to validator.swagger.io to simplify the structure of the specification document.

Although the usage of online utilities is convenient, in some cases it could be better to have our own instance of the converter and validator. For example, if OpenAPI-Suite is provided on a server in an organisation for ObjectScript developers, it may be preferable to avoid requests to external services (privacy, avoid request rate limits).

Just run:

docker run -d -p 8085:8080 --name swagger-converter swaggerapi/swagger-converter:latest
docker run -d -p 8086:8080 --name swagger-validator-v2 swaggerapi/swagger-validator-v2:latest

4 2
1 370
Question
· Feb 6, 2023
irissqlcli install

Hi,

I'd like to try out irissqlcli.

My server, that has IRIS installed on it, is SUSE (SUSE Linux Enterprise Server 15 SP1).

How do install this product from GitHub? Detailed instructions would be great!

It would be best if I can download the software from GitHub and then get pip to install from that downloaded file repo.

The recommended:

pip install -U irissqlcli

does not work and comes back with "

0 7
0 234

If anyone has a custom checklist of tasks that must absolutely be done when doing this upgrade to make sure everything is included and nothing is lost or destroyed, we would greatly appreciate it? We have the generic checklist provided on the support websites but we run custom build classes, ftp, tcp-ip, batch, etc.

Thanks,

Jonathan Harris

0 1
0 136

Let me introduce my new project, which is irissqlcli, REPL (Read-Eval-Print Loop) for InterSystems IRIS SQL

  • Syntax Highlighting
  • Suggestions (tables, functions)
  • 20+ output formats
  • stdin support
  • Output to files

Install it with pip

pip install irissqlcli

Or run with docker

docker run -it caretdev/irissqlcli irissqlcli iris://_SYSTEM:SYS@host.docker.internal:1972/USER

Connect to IRIS

$ irissqlcli iris://_SYSTEM@localhost:1972/USER -W
Password for _SYSTEM:
Server:  InterSystems IRIS Version 2022.3.0.606 xDBC Protocol Version 65
Version: 0.1.0
[SQL]_SYSTEM@localhost:USER> select $ZVERSION
+---------------------------------------------------------------------------------------------------------+
| Expression_1                                                                                            |
+---------------------------------------------------------------------------------------------------------+
| IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2022.3 (Build 606U) Mon Jan 30 2023 09:05:12 EST |
+---------------------------------------------------------------------------------------------------------+
1 row in set
Time: 0.063s
[SQL]_SYSTEM@localhost:USER> help
+----------+-------------------+------------------------------------------------------------+
| Command  | Shortcut          | Description                                                |
+----------+-------------------+------------------------------------------------------------+
| .exit    | \q                | Exit.                                                      |
| .mode    | \T                | Change the table format used to output results.            |
| .once    | \o [-o] filename  | Append next result to an output file (overwrite using -o). |
| .schemas | \ds               | List schemas.                                              |
| .tables  | \dt [schema]      | List tables.                                               |
| \e       | \e                | Edit command with editor (uses $EDITOR).                   |
| help     | \?                | Show this help.                                            |
| nopager  | \n                | Disable pager, print to stdout.                            |
| notee    | notee             | Stop writing results to an output file.                    |
| pager    | \P [command]      | Set PAGER. Print the query results via PAGER.              |
| prompt   | \R                | Change prompt format.                                      |
| quit     | \q                | Quit.                                                      |
| tee      | tee [-o] filename | Append all results to an output file (overwrite using -o). |
+----------+-------------------+------------------------------------------------------------+
Time: 0.012s
[SQL]_SYSTEM@localhost:USER>

10 20
3 671

So, I know that I can return a SQL Error message from my SQL Procedure written in ObjectScript, with code like this

$ cat <<EOF | irissqlcli iris://_SYSTEM:SYS@localhost:1972/USER
CREATE or REPLACE PROCEDURE test()
LANGUAGE OBJECTSCRIPT
{
 SET %sqlcontext.%SQLCODE = 400
 SET %sqlcontext.%ROWCOUNT = -1
 SET %sqlcontext.%Message = "test error message"
};

CALL test();

EOF
[SQLCODE: <-400>:<Fatal error occurred>]
[Location: <SPFunction>]
[%msg: <test error message>]

But I did not find how to do it with Python. I can't find %sqlcontext variable available there

0 1
0 166
Article
· Feb 5, 2023 2m read
COS Url Shortener

Hi Community!

I want to share with you mi first Open Exchange application.

It's a tool to made our developments easier. It's a micro service in a IRIS docker that help us in our new features giving us a way to add short links in our SMS, Email campaigns and for links of the different stores for our apps.

It's very easy to use it.

Simply clone this repo:

https://github.com/daniel-aguilar-garcia/cos-url-shortener.git

1 0
0 272

I copied a 5 MB messages.log file to AWS where I have iris-log-viewer app deployed. I ran the test to see how it takes in IRIS code to import the lines into a persistent table:

IRISAPP>set m5mb="/home/irisowner/irisdev/messages.old_20221231.log"

IRISAPP>

IRISAPP>do ##class(otw.log.irislogreader).Test1(m5mb)
Test1 begins at 02/05/2023 12:49:30
ReadLogLines
/home/irisowner/irisdev/messages.old_20221231.log
Open
Test1 ends at 02/05/2023 12:49:34
Test1 execution time: 3.500789

select count(*) from otw_log.Log

63239

0 7
0 198

Usualy, if you want to deploy a solution, you need to add the items, configure your lookup tables and default configuration manually.
It's okay if you have all the permissions and privileges to perform these actions. If you want to deploy to a client's production server, and you don't have the permissions, you need to indicate in a document ALL the steps that the deployment manager has to perform.

2 0
0 216

Hey Community,

Enjoy watching the new video on InterSystems Developers YouTube:

Let InterSystems IRIS Do the Work: Git Source Control & Linting ObjectScript Across Editors @ Global Summit 2022

https://www.youtube.com/embed/Fh0uyC9owyE
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

1 1
1 352
Article
· Feb 1, 2023 17m read
OpenAPI Suite - Part 1

Hi Community,

I would like to present my last package OpenAPI-Suite, this is a set of tools to generate ObjectScript code from an OpenAPI specification version 3.0. In short, these packages allow to:

  • Generate server-side class. It’s pretty similar to the generated code by ^%REST but the added value is the version 3.0 support.
  • Generate HTTP client classes.
  • Generate client production (business services, business operation, business process, Ens.Request, Ens.Response) classes.
  • A web interface to generate and download the code or generate and compile directly on the server.
  • Convert specification from version 1.x, 2.x to version 3.0.

16 17
4 885

Hello guys,

i try to call a Operation within 3 foreach loops.

When i try to do this, i always get the following error:

I dont get any Errpr when i log my request message at this time i want to call a operation.

Everything works and i get no error. But when i try to call the operation i get this error.

Then i tried to call a operation in the first Level (not in a ForeachLoop) it works.

1 2
1 195