Hello,
We need to create a versioning of an existing API, so we going to set a default version (so far) for current connections to version 1
My first attempt is:
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.
Hello,
We need to create a versioning of an existing API, so we going to set a default version (so far) for current connections to version 1
My first attempt is:
I have a text file that I pick up in a Business Service and need to send it to our vendor via JSON. I assumed (probably wrongly) that I could just create a RESTful Business Operation, plug in the server IP and URL as well as complete some of the other fields on the BO to send the file. When I do this, I get the following error:
ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnMessage+5^EnsLib.HTTP.GenericOperation.1 *HTTPHeaders,Ens.StreamContainer -- logged as '-' number - @' Set tHeaderKey="" For { Set tHeaderKey=pRequest.HTTPHeaders.
Hi Developers,
New Coding Talk, recorded by @Evgeny Shvarov, is available on InterSystems Developers YouTube:
🎯 Creating REST API with InterSystems IRIS, ObjectScript and Docker
The question is pretty much in title. I'm developing a REST API, it has a search endpoint with 10 optional parameters. How do I pass them and stay RESTFul?
To ease the question a bit let's agree that:
Some options I know of:
1. URL parameters.
GET /search?param1=value1¶m2=value2...Quick and easy but I'm not sure it's really RESTFul
Hello,
I am taking some intro lessons in REST from the online courses. Below is a very simple code i wrote. But when i try to see the output by entering the url
http://localhost:57773/rest/coffeemakerapp/coffeemaker i get an error "
If the problem continues, contact the site owner.
HTTP ERROR 401
Thanks,
Jimmy
Class demo.CoffeeMakerRestServer Extends %CSP.REST { XData UrlMap [ XMLNamespace = "http://www.intersystems.
Hi!
We are using Rest Service with inheritance of %CSP.Rest, and we are having the following problem: when we receive 100 request from single IP adress - this creates 100 CSP sessions and takes 100 user licence for each request for few seconds. What can we do do about this? We've set this parameter:
Parameter UseSession As Integer = 1;
Thank you in advance!
Hello again and welcome to the next tutorial on this series: Part 5 - Errors. Here we are going to learn how Frontier handles unexpected errors and how we can force them.
Hi Community!
We are pleased to invite you to the upcoming webinar in Spanish "Desarrollar y gestionar APIs con InterSystems IRIS Data Platform" / "Developing and managing APIs with InterSystems IRIS Data Platform" on October 15 at 16:00 CET!
Are you a backend developer? Or a Systems integration specialist? If so… this webinar is for you!
Hello friends,
I am trying to create REST API in Cache. I am getting a response from postman but when I tried to launch the same URL on the browser, I am getting service unavailable error.
This is my URL http://localhost:57772/widgetsdirect/rest/Gunwant
Any help is greatly appreciated.
Thanks and Regards, Gunwant Kapade
We've just published an update to the Serenji extension for VS Code. Starting with this version (3.0.7) you can now debug the code that implements your REST services. Here's a taster:

Read more about Serenji on Open Exchange.
Hi Guys,
I am new to Cache, I am trying to create an simple REST API on Studio and testing it with postman before that i have config the Web Application System > Security Management > Web Applications > Edit Web Application and i have attached my snapshot also with this post.
When i testing it on postman i am getting "Service Unavailable" error. I really don't know where i did a mistake. I tried to console it on my code, when I the postman Url is not calling my code,So i think i did a mistake on my config part. Please give me some suggestion
Thanks in advance.
Some time ago, InterSystems introduced the concept of %DynamicObjects.
This feature is a powerful tool that makes it very easy to convert any string of JSON text to objects and vice versa.
However, in the work that J2 Interactive is doing for our customers, there are a couple of things that "need some tweaking".
Very often, we create REST services for our customers. Those services have a payload (in JSON format) that contains information that our customer expects in the form of an object that is proprietary to them.
Can you please provide steps to debug in VS code using serenji and how to put break point in VS code, I have tried using F9 but it is not working.
I want to debug API code using postman.
Hello!
My goal is to serve files using REST classes only (no filesystem should be used), and I am a halfway far from it.
What I am succeeded in, is serving character files (html/css/javascript/etc) using the next approach:
Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good
). You can download from GitHub and compile it into your system, generate sample data and play a bit with
Hi Community!
You're very welcome to watch a new video on InterSystems Developers YouTube, recorded by @Stefan Wittmann, InterSystems Product Manager:
InterSystems API Manager Introduction
IRIS provides us with anti login CSRF attack mitigation, however this is not the same as a CSRF attack, as login attacks only occur on the login form. There are currently no built-in tools to mitigate CSRF attacks on api calls and other forms, so this is a step in mitigating these attacks.
See the following link from OWASP for the definition of a CSRF attack:
Hello All,
I have a outbound Http adapter.
How do i see the HTTP Request which is going out using Message Viewer or Trace? I want to see the entire message with the Headers and Body.
Thanks,
Jimmy Christian
Hello community,
I am trying to parse the below HttpResponse in Cache. Cannot get the Iterator to work. Is there a single loop which can parse both or single messages and grab the error?
{
error:[
{ txt1:'error msg1'},
{ txt2:'error msg2'},
]
}
{
error: {
txt1:[
'error msg1',
'error msg2'
]
}
Thanks,
Jimmy Christian
Hello Community,
Hope someone can assist me to POST a JSON to the below URL. It works perfectly with POSTMAN. But when trying with cache/Ensemble i receive Method not found error
Below is the configuration.
.png)
Set tURL=..Adapter.URL
Set pRequest={"name":"abc1jim23","salary":"123","age":"23"}
set tSC=..Adapter.PostURL(tURL,.tHTTPResponse,,pRequest)
Response is complaining about the Method not found Http error.
Assistance will be appreciated.
Thanks,
Jimmy Christian.
The Widgets Direct sample application highlights many aspects of how to use InterSystems technologies to build a modern web application.
Hello ,
I am trying to make a REST call using the example given in documentation for Creating REST Services and Clients with Ensemble.
Class Test.REST.WeatherOperation Extends EnsLib.REST.Operation
But i receive below mentioned error. If anyone can help me out here.
ERROR <Ens>ErrGeneral: ERROR <Ens>ErrHTTPStatus: Received non-OK status 404 from remote HTTP server: 'HTTP/1.1 404 Not Found':<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
Thanks,
Jimmy Christian.
Hi Dev Community,
My team is currently working on a project where we need to post pdf documents to a 3rd party REST API.
The API specifies a field in the JSON request message to contain the 'physical content' of the file as an array of bytes, example of the JSON request as follows - data truncated for readability purposes:
{
"CaptureSource":2,
"RecipientID":"ID34",
"Document": {
"Guid":"5D847A4E9CC1485382DC4A5F5DC80D6C",
"EventDate":"2019-01-14T13:23:46",
"FileExtension":"pdf",
"FileContent":"JVBERi0xLjQNCiXi48/TDQoxIDAgb2JqDQogIDw8DQogICA.
Referencing this post:
https://community.intersystems.com/post/producing-json-sql
I'm not sure how to actually interact with the result set I get from doing something like this. I want to return something like:
[{"field1":1, "field2":2}, {"field1":2, "field2":10}]
I'm finding it very difficult to get it in this format, since %Print appends a newline onto the end of the {} object it prints.
Here's the closest I've gotten:
set query = "select JSON_OBJECT('field1': field1, 'field2":field2) from MyTable where x=? and y=?"
set tStatement = ##class(%SQL.Statement).%New()
set qStatus = tStatement.
Hi All,
I have a REST dispatcher class in which I enabled the
I can able to access the API using Postman, but not with my web application. It throws the below error.
Access to XMLHttpRequest at 'https://ec2-10-200-XXX-X.com/REST/MRM/get/Message?MessageCode=ERR0006&L…' from origin 'https://ec2-80-106-XX-XXX..com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Is this something need to be modified in the apache config file
Hi Guys,
I have a DB server (ser-app-db) where IRIS is installed as server.
I have a Web server (ser-app-w) where IRIS is installed as web server and configured as CSP gateway.
I followed the configuration guide and ser-app-w perfectly display the CSP and CLS pages.
But that's not working for my REST service, for exemple with the REST sample:
http://ser-app-db/REST/CRM/Get?ReqID=123(GET): work and show the request
http://ser-app-w/REST/CRM/Get?ReqID=123(GET): return a 404.
I am using Apache server in Linux box.
I am not sure what I am missing in the config.
httpd.
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.
One of these functions uses %SQL.Statement to prepare a class query on %Dictionary.CompiledClassQuery, Summary. This works perfectly if I give the web app making the call %All privileges but obviously I don't want to do that.
Hi dev community,
I am currently working on a project to send documents to a RESTful based API that supports bearer
Token Authorization.
When we try to fire a JSON request from our EnsLib.Rest.Operation towards the 3rd party API with a
valid Token we keep receiving Authorization Error codes HTTP 401 back.
If we use the same request and same Token from a test utility such as Postman the request is
successful and we are able to move past the authorization stage.
We are inputting the Token in the header of the HTTP request as specified by the 3rd party API
specification.
Hi All,
How to create Https request with Negotiate,NTLM Authentication in cache using %Net.HttpRequest package.
I tried with basic authentication it is throwing >401 - Unauthorized: Access is denied due to invalid credentials.
can anyone please guide me
Many Thanks !!
Vicky
Hi there,
I'm trying to develop a program calling Cache REST service twice with Cors. The first is fetching some information of a patient with GET request, the second is using obtained information to call another REST service(implemented in the same class though) with POST to perform other tasks.