Has anybody ever enabled the standard CSP login page for a web application with REST dispatch class? Any ideas how to do this?
(Context: I'm using %CSP.REST with other stuff behind it, not actually a REST API.)
Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.
Has anybody ever enabled the standard CSP login page for a web application with REST dispatch class? Any ideas how to do this?
(Context: I'm using %CSP.REST with other stuff behind it, not actually a REST API.)
This article is translation of one from Habrahabr InterSystems blog (Russian).
The original post can be found here: https://habrahabr.ru/company/intersystems/blog/251611/
Everyone familiar with InterSystems Ensemble, an integration and application development platform, knows what the Ensemble Workflow subsystem is and how useful it can be for automating human interaction. For those who don’t know Ensemble (and/or Workflow), I will briefly describe its capabilities (others may skip this part and learn how they can use the Workflow interface in Angular.js).
InterSystems
Intersystems IRIS for Health has excellent support for the FHIR industry standard. The main features are:
1. FHIR Server
2. FHIR Database
3. REST and ObjectScript API for CRUD operations on FHIR resources (patient, questionnaire, vaccines, etc.)
This article demonstrates how to use each of these features, as well as presenting an angular frontend for creating and viewing Quiz-like FHIR resources.
To create your FHIR Server, you must add the following instructions into iris.script file (from:
In this article, I’d like to present details of which technologies we had been using to develop our application for the IRIS for Health Contest:
ToC:
First let me quickly introduce the application supported by those
In this article, I would show how you can upload and download files from InterSystems products via http.
The questions about working with files over http arise fairly often on community and I'm usually linking to my FileServer project which demonstrates file upload/download but I'd like to talk a bit more on how we can serve and receive files from InterSystems products.
If you have a file in on a file system and you know the path you can serve it from REST or CSP context by calling this method:
ClassMethod serve(name As %String) As %Status
{
#dim sc As %Status = $$$OKWhen using the REST API classes for building services on a spec-first approach, the implementation class methods are usually built this format:
ClassMethod <method-name>(body As %DynamicObject) As %Stream.ObjectBut sometimes it keeps building the endpoint implementation method like this:
ClassMethod <method-name>(body As %Stream.Object) As %DynamicObjectIt has been a problem because the rest of my implementation rely on the fact that the "body" object is a DynamicObject.
The REST spec is exactly the same for all endpoints, but this last it built keeps presenting this problem.
Someone has
I am trying to secure a rest service but I lack the understanding of how to achieve this if anyone will explain in details how I could achieve the following:
Securing The REST Service with Basic Auth (username and password)
if any one has a sample code on this will appreciate
I have a REST Service that I want it to receive a json string request I have set up my URLMap as follows the top URL when populated and requested works fine but I would like my request to be a json string and that is not working I am getting a 500 error am I missing something please advice.
XData UrlMap
{
<Routes>
<Route Url="/:emailAddress/:sendUserEmail/:password" Method="POST" Call="ResetPassword"/> this works fine
<Route Url="/test" Method="POST" Call="test"/> I would like this to receive a json formatted string for the above
</Routes>
}
Hi community,
I have to do a development that should to connect with a external REST API and it throws different HttpStatus and a body content with the description of the problem.
I'm using the following code:
set tSC = ..Adapter.SendFormDataArray(.tHttpResponse,"POST",tHttpRequest,,,URL)If the external API responses throws a 400 Status (Bad Request)
.png)
the tSC values is an error status and the value of tHttpResponse is empty, so I'm not able to check what is the Status Code and the content.
tSC="0
I cloned iris-interoperability-template for my app interoperability-test. I wanted to develop an app to test interfaces in Interoperability productions.
I have never run a container in Docker Desktop. I always run containers in AWS. My first problem was that I got an error when I tried to build the image using docker-compose. The error was about BuildKit. I worked around the error by building the image with a docker build command relying on DOCKER_BUILDKIT environment variable:
DOCKER_BUILDKIT=1 docker build --progress=plain --no-cache --tag testint .
Next I updated docker-compose.yaml to use
I deployed online demo here:
I updated several settings (File paths and URLs) and I switched Dispatch class to dc.rest.GenericService.
I resent the message from File Service. I saw messages received by both Auth and Api services.
Api process does not (yet) return the desired response. More to come ...
Hello Community!
This article gives an overview of the REST JSON webservices developed for TrakCare.
These webservices allow users to access TrakCare data from outside of the software, mainly through external apps.
They are developed in REST with ObjectScript, and they allow data access in four modes:
This is a detailed guide to develop RESTful services using InterSystems Ensemble. The goal of this guide is to make you understanding the basic concept and building blocks of a RESTful service. The service is going to provide a very basic functionality (a “Hello world!”).
You will learn how to create required components as Ensemble classes, configure the run-time as an Ensemble Production and create a service configuration as a web application.
The Ensemble documentation library explains basically two ways to implement RESTful web service using Ensemble.
In this article you will have access to the curated base of articles from the InterSystems Developer Community of the most relevant topics to learning InterSystems IRIS. Find top published articles ranked by Machine Learning, Embedded Python, JSON, API and REST Applications, Manage and Configure InterSystems Environments, Docker and Cloud, VSCode, SQL, Analytics/BI, Globals, Security, DevOps, Interoperability, Native API. Learn and Enjoy!
Machine Learning is a mandatory technology to build advanced data analysis and automate manual activities with excellent efficiency.
Healthcare interoperability is instrumental in improving patient care, decreasing healthcare provider costs, and providing a more accurate picture to providers. However, with so many different systems, data is formatted in many different ways. There are many standards that have been created to try to solve this problem, including HL7v2, HL7v3, and CDA but each one has its drawbacks.
FHIR, or Fast Healthcare Interoperability Resources, is a new format for healthcare data that aims at solving these problems.
What are other's thoughts, opinions and experiences going from CSP to RESTful services, specifically when it comes to reusing code in CSP files?
One could define a method in CSP as follows:
<script language="cache" method="SubmitSomethingAwesome" arguments="aswesomeId:%Numeric">
And it's generated in csp.mycsppage.cls ascsp.mycsppage.SubmitSomethingAwesome(awesomeId as %Numeric).
Have people had success defining there rest call by calling the generated CSP classmethod?
Things that work well I've found:
- Procedure block is off so you can easily pass the symbol table around from the REST
InterSystems IRIS 2019 is going to introduce new and exciting features. One of the areas with new interesting must-to-know things is the API Management.
OpenAPI initiative (https://www.openapis.org/) is the organization supporting a standard specification to define APIs (https://github.com/OAI/OpenAPI-Specification).
In this article, I would like to talk about the spec-first approach to REST API development.
While traditional code-first REST API development goes like this:
Spec-first follows the same steps but reverse. We start with a spec, also doubling as documentation, generate a boilerplate REST app from that and finally write some business logic.
This is advantageous because:
Let's develop our API in a spec-first approach!
I have successfully created REST service classes on my local IRIS server following this book: Using the /api/mgmnt/ Service | Creating REST Services | InterSystems IRIS Data Platform 2021.2
I am now 1) trying to edit impl.cls in VS Code and 2) export it to my local repo so I can push to the remote repo.
When I click on my project in VS Code and 'Add to project' and choose the new package, spec.cls and impl.cls, I get the following error:
ERROR #5540: SQLCODE: -114 Message: Unable to acquire lock for INSERT of child row for parent table '%Studio.Project' with parent id = 'Default_project'
Has
Hi community!
I'm using Insomnia software for testing my REST applications from cache and wanted to know how do I debug POST that got sent into backend by this tool via json sent from the request body!
I'm using 2018 cache and running tests by VSCode
thanks for any help
The Carbon Footprint Counter application uses the GHG Protocol to measure carbon emissions on enterprises. The GHG protocol establishes comprehensive global standardized frameworks to measure and manage greenhouse gas (GHG) emissions from private and public sector operations, value chains and mitigation actions.
Building on a 20-year partnership between World Resources Institute (WRI) and the World Business Council for Sustainable Development (WBCSD), GHG Protocol works with governments, industry associations, NGOs, businesses and other organizations. (source: https://ghgprotocol.org/about-us).
As I was thinking what I could develop for InterSystems Full Stack Contest, I saw this post:
https://community.intersystems.com/post/how-access-production-items-through-objectscript
I developed ProductionManager.csp. It displays items in the active production. It also displays the Class in use and the date and time of last message. I believe these data points can help you make decisions which items to remove from the production.
I read that contest asked for apps which insert, update, or delete data in InterSystems IRIS.
I am still working on iris-for-money app: https://github.com/oliverwilms/iris-for-money
Account.csp posts a rest call with _SYSTEM username and the password.
xhttp.open("POST", "/restapi/sql/" + query, true,"_SYSTEM","SYS");
xhttp.send();
/restapi web application has Password Authentication Method enabled.
SYS is the correct password for _SYSTEM user.
I do not understand why I see login failure in Audit database.
I am working on iris-for-money app: https://github.com/oliverwilms/iris-for-money
Account.csp posts a rest call with _SYSTEM username and the password.
xhttp.open("POST", "/restapi/sql/" + query, true,"_SYSTEM","SYS");
xhttp.send();
The error is logged in Riches.REST for this line:
Set tSC = tStatement.%Prepare(pQuery)
ClassMethod PostSQL(pQuery As %String = "", pIndex As %String = -1) As %Status
{
Do ..DebugTEST("Riches.REST - PostSQL")
Do ..DebugTEST("pQuery = "_pQuery)
Set tSC = ..TestQuery(pQuery,.pQuery)
Do ..DebugTEST("TestQuery = "_pQuery)
Set tStatement =
Hello, everyone!
InterSystems IRIS has a menu called Interoperability.
It provides mechanisms to easily create system integrations (adapters, record maps, BPMs, data conversions, etc.) so different systems can be easily connected.
A variety of operations can be included in the data relay process, as examples we can cite: to connect systems that are not normally connected, data can be received (or sent) according to the specifications of the destination system.
Hello everyone,
I would like to know if it is possible to connect to a REST API through production, without having to write a class that extends %CSP.REST. Is there a GUI based way where I can configure my GetRest and then use EnsLib.REST.GenericService and EnsLib.REST.GenericOperation to configure my production and perform transformations?
While reviewing our documentation for our ^pButtons (in IRIS renamed as ^SystemPerformance) performance monitoring utility, a customer told me: "I understand all of this, but I wish it could be simpler… easier to define profiles, manage them etc.".
After this session I thought it would be a nice exercise to try and provide some easier human interface for this.
The first step in this was to wrap a class-based API to the existing pButtons routine.
I was also able to add some more "features" like showing what profiles are currently running, their time remaining to run, previously running processes and more.
The next step was to add on top of this API, a REST API class.
With this artifact (a pButtons REST API) in hand, one can go ahead and build a modern UI on top of that.
For example -
.png)
Hi guys,
has anyone done a simple angular searchbar with a REST API on Caché in the back?
I've done this Let's write an Angular 1.x app with a Caché REST backendhere in the community and it
works fine for me.
The REST in Caché is already developed but im hanging at the searchbar in Angular, don't know how to solve this.
Has somebody an example to help me out?
Any help would be appreciated.
Hi Community,
This post is a introduction of my open exchange iris-fhir-client application.
iris-fhir-client can connect to any open FHIR Server by using embedded python with the help of fhirpy Library.
Get Resource information by terminal and by using CSP web application.
Hey Community,
Exciting results from a massive workload to test InterSystems API. We'll describe how we're trying to push the boundaries of the current technology in the public cloud: