Hi everyone,
are you curious which topics we are going to cover at this year’s Global Summit? You have come to the right place! I will provide you with a sneak peek of what you can expect from the areas I am responsible for.
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.
Hi everyone,
are you curious which topics we are going to cover at this year’s Global Summit? You have come to the right place! I will provide you with a sneak peek of what you can expect from the areas I am responsible for.
In a EnsLib.REST.Operation I have...
Set tSC=..Adapter.Post(.tHttpResponse,,pRequest.stream)
This sends JSON string over HTTP
I am getting this error back from the server
ErrHTTPStatus: Received non-OK status 415 from remote HTTP server: 'HTTP/1.1 415 Unsupported Media Type'
I have been told that the media type should be "JSON"
how do I go about changing the media-type of the HTTP Request?
Trying to get an outbound operation working using the EnsLib.REST.Operation class but having problems
from the Operation
{
Parameter ADAPTER = "EnsLib.HTTP.OutboundAdapter";
Property Adapter As EnsLib.HTTP.OutboundAdapter;
Parameter INVOCATION = "Queue";
Method ProcessTaskEX(pRequest As Ens.Request, Output pResponse As Ens.Response As %Status
{
// Get URL
Set tURL=..Adapter.URL
// Execute the call
Set tSC=..Adapter.PostURL(tURL
Hi, Community!
I’m sure you are using Developer Community analytics built with InterSystems Analytics technology DeepSee:
You can find DC analytics n InterSystems->Analytics menu.
DC Analytics shows interactive dashboards on key figures of DC entities: Posts, Comments, and Members.
Since the last week, this analytics project is available for everyone with source code and data on DC Github!
Hi,
I'm getting mad trying to get data from an external REST service that uses Basic Authentication from Ensemble. The BO worked fine when I was using a test server without authentification, but as soon as we need to go to production I cannot have it working.
So far, I've created the username/password at the credentials page (Ensemble-Configure-Credentials). I've setup the BO to use this credentials. But nothing happens.
I've tried with the Rest Client (addon for Mozilla), and using the same address, port and user/pwd works just fine.
The REST webservice works perfectly when run on SOAP UI. This end point server is an https site that uses basic authentication (uname and pwd). But when I run the request through an Enslib.Rest.Operation using a configured SSL and stored credentials, I get an "unauthorized" error, unless I explicitly hard code the password in the operation class. HS Version is 2014.1 .
I have 2 questions. Pardon me, they are both related!!
I'm trying to have my REST service return the entire data set for one of our legacy globals. Currently I am parsing the object from a SQL statement into generic objects to be returned like this:
Set specimenArray=[]
WHILE resultSet.%Next() {
Set specimen = {}
Set specimen.SpecimenId= resultSet.SpecimenId
Set specimen.ProjectId = resultSet.ProjectId
Set Oref = specimenArray.%Push(specimen)
}
Set tProxy = specimenArray.%ToJSON()
set %response.Status = 200
set %response.
I have an Enslib REST web service using an http host. How can it be converted to use https?
I have a CSP REST web application where I'm using delegated authentication via basic authentication in the REST calls. When I do a call to the web app with correct user credentials, I get a CSPSESSIONID cookie back representing the CSP session, which has started for the user I'm logged in with.
And when I want to log out/end the CSP session with the "CacheLogout=end" query parameter, I get a 401 Unauthorized code back. But the csp session itself does get terminated, which means the logout call was successful.
Is there a way to have it return a 200 OK status code?
or "Didn't you say you would cover Persistent Objects in Part 5, Chris?"
Yes, that was the plan. This is a pretty important topic, so it get's its own Article
Up until now, we've display widget JSON that has been created by a basic loop. Clearly this isn't of much value. Now we have our stack connected together, and we can see that the data is flowing to the Welcome page, it's time to complete the stack and start feeding our service from "real" data.
Let's start with our (very basic) Persistent class for Widgets. We have 4 properties to hold Name, Description, Price and current Quantity.
Hi Community!
New video "Treating Patients with REST and iKnow" is available now on DC YouTube Channel:
Hello,
I want to convert a json, which passed on in the a REST call, into a request message.
I use method %ConvertJSONToObject of the %ZEN.Auxiliary.altJSONProvider class.
Set sc = ##class(%ZEN.Auxiliary.altJSONProvider).%ConvertJSONToObject(%request.Content, "TestRequest", .request)
Is there an alternative for this? I want to avoid to use the %ZEN library.
Best Regards
Roger de Coninck
In this article I would like to present the RESTForms project - generic REST API backend for modern web applications.
The idea behind the project is simple -after I wrote several REST APIs I realized that generally, REST API consists of two parts:
And, while you'll have to write your own custom business logic, RESTForms provides all things related to working with persistent classes right out of the box.
Use cases
Hello,
In all web services, i need to my get login and token. So with Postman, i tried to call a HTTP request where I put the login/token in the header :
I tried to get data from Http request header. The REST APi use

But it didn't work..
Someone can give me some example or other method ?
Regards,
Would anyone recommend techniques on how to limit the amount of calls that external groups are making to our resources?
Recently we had an issue where one of our ODBC accounts maxed out the license to one of our DB servers (50 max).
I need to redirect user to a url, which is 5000+ characters long.
To do that I set:
set %response.Redirect = url
However, in the browser I receive this header:
LOCATION: <First 3972 characters of the 'url' variable>
In WriteHTTPHeader method of %CSP.Response, where the LOCATION header is
written:
Write "Location: ", <Redirect>,!
After I added a buffer flush, after the above-mentioned line:
Write *-3
Then in browser I received full, correct value of a LOCATION header.
Is there a better solution?
It's a rest API, so maybe there's some callback method I can override to flush the output buffer?
Hi
We are trying to create a new operation wich gets a XML message and send it's contents in an email.
We've used the SOAP Wizard to generate the Proxy Classes but now we are a bit lost...
What we are trying to achieve is to Create appointments in a Outlook Calendar and send emails.
Hi,
Trying to work with REST protocol, using IIS 8, both client and server are Cache servers,
I have the following problem-
When I send a PUT command, I get the following error:
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>
Get , Post , Delete - work OK.
This problem does not happen if I use Apache, so it's a IIS problem , not a Cache problem.
Hi
Made a request for API REST.
Using HTTP Request adapter.
Outside the Ensemble an API response is JSON (CORRECT)
Answer in Ensemble: =?Á
Â0
?_eä,cÒ
'=
*^<YÙF¡í$í¼ÈÞÝt
oÉ÷ý$?|
¤1¡{Dâhà°Ý?Öù)2ós??R?¸¼?ºd?$,ñD+»??
?
ÔºQZéýNÕ V{C?óò?b¢?éÍ )$
²5Å?wEë? ??©tÖã1z×2FëÊnôeË æ??]Zßq ܺ?á
Help me.
Thank you
Hello.
We have a request message with properties that has underscore. This is because we need to convert that request to JSON.
The problem is when we try to assign a value in a Business Process with the editor. It doesn't work, it doesn't compile.
How can we fix this?
This is the object used in the request:
And this is the error:
Does developing a RESTful API in Caché remove the requirement to use the InterSystems.Data.CacheClient.dll and generate proxy classes using the Caché Object Binding Wizard for .NET web development? If anyone has links to sample applications using .NET with Caché and REST Services, I would be grateful if you could share them.
Last time, we stopped on static stuff. Let’s continue...
Hi Everyone!
New webinar "Rest API Design and Development" is available now on InterSystems Developers YouTube Channel:
As an advanced alternative for REST calls, the new vue-qewd plugin for Vue.js allows easy integration with QEWDjs using WebSockets.
For many in today's interoperability landscape, REST reigns supreme. With the overabundance of tools and approaches to REST API development, what tools do you choose and what do you need to plan for before writing any code?
Now that you've learned how to create a REST API in the REST & Relaxation webinar, see how you can successfully make it big. Join @Eduard Lebedyuk, InterSystems Sales Engineer, for REST API Design and Development. You'll learn design patterns and considerations that allow you to build highly robust, adaptive, and consistent REST APIs.
This series of articles aims to address the following topics:
In our last lesson, we implemented a new REST Service to allow us to perform CRU operations on Widgets, and refactored our Controllers to allow the page setup to be decouple from the content.
When we created our Widget Services, we did not implement a Deletion operation, which the HTTP Delete verb provides. As this is a base table for other parts of the Widgets Direct empire, we don't want to be able to do a hard Delete of the WIdget values, as this could cause issues with our ordering and billing modules.
I'm experimenting with sending large amounts of data in a POST payload to be stored as a stream. However I've noticed that no matter how many characters are in the message, Cache only gets about 32k of them, cutting off the rest. Conversely as expected it can only send about 32k worth of characters in a payload.
Before I get creative, is there a REST message size limit that can be changed? Or is there something else going on here?
Thank you!
I am trying to use the automated unittest class for a %CSP.Rest service.
So my Unittest code set's %request and %response from %CSP.Req/resp respectively
I build a tProxy with the fields I need for the post and set it %ToJson... I have tried seting %request.Content = tProxy (and not)
I call the method for the post url directly...
When that method calls %fromJson to set an object with the info. I passed...
- when I don't set %request.content.. I get a error '5035 - premature end of data code 12'
- when I set %request.
Hi.. I have an issue where we are using OAuth2.0 with the ZAUTHENTICATE routine. Once our token is validated we are using a users lan id (passed on the ID token) to find a software defined username in a Cache Global.
That is all working fine in ZAUTHENTICATE.. I am setting the software defined username in the Properties("Comment") array and wanting to reference it in the Rest Service Dispatch class.