Hi Community!
Please welcome a new video on InterSystems Developers YouTube Channel:
Developing with FHIR - REST APIs
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 Community!
Please welcome a new video on InterSystems Developers YouTube Channel:
Developing with FHIR - REST APIs
Hi all,
I'm wondering if is possible to extend the UrlMap.
I want to create a base class and one method will be in all extended classes, so I've tried to create the map route in parent class, and the specific methods in extended class. But it doesn't work.
I've create the method in parent class and I've wrote the map in extended class. It works, but I want to put it in base class to prevent forget this call.
Note: The base class extend to %CSP.RES
Best regards,
Francisco Lopez
I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on. I have used SoapUI with 200 result so as postman and swagger
Hi All,
I am trying to get JSON data from a REST api. I am using my web browser to get the data by hitting the URL.
The data is receiving properly, but the JSON contains a few HTML tags.
These tags are not not receiving in the browser while hitting the url. Is there any way to overcome this issue ?
Thanks,
Hi
I'm trying to send a request to a REST API Service.
I'm using this code (Adapter is "EnsLib.HTTP.OutboundAdapter")
Method Put(pRequest As SIGE.Grupo.BO.Operation.putRequest, Output pResponse As SIGE.Grupo.BO.Operation.putResponse) As %Status
{
set tSC = $$$OK
try
{
set tFormVar="Content-Type,apikey"
set tContent="application/json"
set tApiKey="somekey"
Set tOut=##class(%IO.StringStream).%New()
set tSC= ..ObjectToJSONStream(pRequest,.tOut)
Set tSC=..Adapter.Put(.tHttpResponse,tFormVar,tContent,tApiKey,tOut.Data)
If $$$ISERR(tSC)&&$IsObject(tHttpResponse)&&$IsObject(tH
We have a Cache database in Azure, and want to expose it as an OData source (link).
My first attempt was to use Microsoft's Visual Studio 2017 and Entity Framework to create the data models...but it seems as if EF and Cache don't work together. (I do have those instructions from 2013, but they don't work. (See other post. Best answer seems to be "migrate to IRIS 2019.1.")
Is there any other form of OData support?
Hi All,
Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.
But the problem is the request is in XML Format and also response is in XML format.
Example :
https://XYZ.com/ABC.dll?API=CSLookUP&XML=<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>
<Zip5>20024</Zip5>
</ZipCode>
</CityStateLookupRequest>
and in Response
<?xml version="1.0" encoding="UTF-8"?>
<CSLookupResponse>
<ZipCode ID="0">
<Zip5>20024</Zip5>
<City>WASHINGTON</City>
<State>DC</State
There's a new and exciting enhancement to QEWD that has just been released - it's an additional layer of abstraction known as QEWD-Up. QEWD-Up hides away all the mechanics of QEWD itself, allowing you to focus on just your REST APIs and the code that implements them.
Additionally, and importantly, QEWD-Up simplifies the maintenance of your REST APIs, allowing you (and others) to quickly and easily understand their life-cycle and implementation.
QEWD-Up supports both monolithic application designs and MicroService-based architectures where APIs are broken down by, for example, functional role.
Yo
This little guide would help you start running Ensemble REST services in no time.
As a result of Evgeny's recent questions regarding the use of QEWD.js with IRIS in another post, I thought it would be a good idea to create a separate post focusing specifically on how to use QEWD.js to create REST APIs for IRIS.
QEWD.js is, of course, a Node.js framework, and all the REST API code can be written entirely in JavaScript.
The RealWorld Conduit reference application makes a great exemplar for this kind of thing, as the APIs are all published and there are numerous implementations of both front-ends and back-ends for it, using different technologies, frameworks and databases.
I am trying to explore some new possibilities outside of the normal day to day HL7 interfacing we do. I have only done 1 other Web Service interface but it was using a SOAP proxy wizard. Now I am tasked with trying to make a call to an external API
https://npiregistry.cms.hhs.gov/api/
but I am a bit confused about how to go about doing it.Since they don't have a wsdl, this means it is a REST web service correct?or is it considered an API call?
Hi All,
I want to connect with Python pages from cache database by using Restful API's. I'm not sure which one is best method. I have mentioned below the methods. Please post your thoughts.
1) CSP Session
2) OAuth 2.0(Delegated access)
3) EWD(Enterprise web development)
Thanks in advance.
Thanks,
Arun Kumar Durairaj.
Hi,
I'm having the following error when returning a large dataset from a REST API.
"errors":[ {
"code":5002,
"domain":"%ObjectErrors",
"error":"ERROR #5002: Cache error: <STORE>%0NmGk1+5^xxxxxx",
"id":"CacheError",
"params":["<STORE>%0NmGk1+5^xxxxxxxxxxxxxxxxxxxx"
]
}
],
"summary":"ERROR #5002: Cache error: <STORE>%0NmGk1+5^xxxxxxxxxxx"My understanding is that this error is related to the amount of memory available.
Please see my method implementation below.
Hi,
I'm using InterSystem Cache v2015.2.5 and I'm implementing a REST API and returning JSON.
Following the documentation I see examples like this
Set obj = {"destinations": ["London","Madrid","Tokyo"]}
Write obj.%ToJSON()
However, I have a compilation error
ERROR #1054: Invalid expression : '{"destinations":'
Is there something that needs to be enabled on Studio to allow this syntax?
Thank you,
Rui
Hi,
How Can I get sentiment analysis (positive or negative attribute) from a source or entity from iKnow REST API?
I am working on my first REST operation concept and had a question about the Property Parameters. If I put a value in CAPTION, does that mean that when I use it in my call that it will come out in the URL?
For example...
Property enumerationType As %String(CAPTION = "enumeration_type");
Then in my operation...
Set tURL=..Adapter.URL_"?q="_pRequest.enumerationType
so when it builds the URL it looks like...
Hi,
We are trying to write an external backup application to backup Cache Database. After going through the Cache DB documentation, we have found that in Backup.General class there are methods for creating snapshot (Freeze/Thaw) which is required during backup. Are there REST APIs for the same?
Also we have the option of selecting individual DB instances in the management portal. What are the methods/APIs of getting the DB list, so that user can select individual DB instances in an external backup application ? Do we have the methods/APIs to freeze/thaw the individual DB instances ?
Thanks!
Satis
Hi,
I have been reading the posts and the documentation around JSON support available with 2016.2 (which is my version) and following versions, but haven't found a concrete example of how to design and implement a complex JSON entity object. I'm working on creating a REST client to connect to an external service and working on modeling the request and response objects, but keep running into invalid OREF when trying to access elements. I've tried creating a container class 'request', which extends %Library.DynamicAbstractObject and has properties tag which is a string and body which is another
I try to test our REST/JSON (POST) services,where queryparametres are in content as json and the answer in contet is also as json.
This is my testClient:
Class XXX.RESTClient Extends %RegisteredObject
{
ClassMethod TestXXX()
{
#dim tRequest As %Net.HttpRequest = ##class(%Net.HttpRequest).%New()
set tRequest.ContentType="application/json"
s json=##class(%ZEN.proxyObject).%New()
s json.x="XXX"
d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.jsonStream,json)
set jsonText=jsonStream.Read(jsonStream.Size)
set tSC=tRequest.EntityBody.Write(jsonText)
set tSC = tRequest.Post("http://server:577
Hi,
private _loginUrl =
Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In this third part of this article series I will show how to link our React app to our three back-ends we created in part 2.
or "Bonus Breakage"
In our last lesson, we added a relationship between 2 persistent classes. We are clearly going to need to start creating REST Services to expose CRUD operations for each of these classes, but before we do that, we should really finish defining our linkages. We added code to our Widget toJSON to spool off related Accessory data, so we should really do the reciprocal and allow Accessories to return all Widgets that are compatible.
The code we can use is essentially the same as we used on the Widget side.
404 Not Found
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?
I'm testing out the new %CSP.REST way of creating an api and having a problem with a POST getting a 405 error.
I get data returned when I do a GET, so I don't think it's a configuration issue or a class issue.
I have no problem with %CSP.Page when creating a REST type method. So what am I missing?
Can someone give me some advice?
Thank you.
So by queryString I mean name-value pairs passed in as part of the URL. Currently my service works when called like this
http://{{SERVER}}:{{PORT}}/bsolabs/api/codemanagement/testcode/BIO/CRP
What would I need to change so I can call it like this?
http://{{SERVER}}:{{PORT}}/bsolabs/api/codemanagement/testcode?Discipline=BIO&TestCode=CRP

I already talked about GraphQL and the ways of using it in this article. Now I am going to tell you about the tasks I was facing and the results that I managed to achieve in the process of implementing GraphQL for InterSystems platforms.
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
Class LPCH.FSE.DictionaryItems.All.Operation Extends EnsLib.REST.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,.tHttpResponse)
//Return the response
If $$$ISERR(tSC)&&$I