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.
I am trying to call to a website that renders a xml structure as a response.if I put the url on the browser an xml rendered page is returned but if i call to this using the below code I get an object reference error which I am finding had to understand is there anyone who could help understand this error or point me in the right direction thanks.
I want to develop a web application in which a user can log in through the user credential of intersystems that is created in Management Portal for a specific role. How can I authenticate the user and get any token or login cookie through which user can call other apis
Thank you very much for reading the doubt and above all thank you very much for answering.
Given the following use case:
If we have a Destination Service that through a HTTP GET by REST gives us a certain JSON response, where it should be noted that it is a list of objects where each object in the list does NOT have a key:
I am looking for a sort of REST interoperability adapter that can forward REST calls within HealthConnect. If necessary, we need to adjust the requests or responses.
For Fhir calls, we use the FHIR Interoperability Adapter. This works perfectly; a message comes in as HS.FHIRServer.Interop.Request, and a message HS.FHIRServer.Interop.Response goes out. I can make adjustments as needed to both the request and response. I am looking for the same functionality, but then for non-FHIR REST calls.
It is clear how to get the request header value with a specific name:
Class My.RestController Extends %CSP.REST
ClassMethod processRequest() As %Status
#dim request as %CSP.Request
set request = %request
set h = ##class(%REST.Impl).%GetHeader("...")
But I can't figure out how to enumerate ALL the request headers (and also get all values).
However our org requirement is for a caller to provide the API version in the HTTP request header. I am finding the cleanest way to route to the correct class using the header version. My classes are setup as
I am using the %Net.HttpRequest class to download a file from the internet .using the following code. When a file is returned in the DOM I am able to read the file content and save it to the desired location but when my response is a download dialog nothing is returned in the HttpResponse. Am I doing something wrong here is where I have gotten to so far any help appreciated.
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.
We have created a number of REST adapters that extend %CSP.REST and these have been working fine. However, we are now facing a problem with a new one where very large XML documents are being posted. This is the pattern we are following:
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.
After some trials, I am comfortably on my way developing spec first REST APIs using /api/mgmt/, OpenAPI 2.0, testing with Postman.
My question is related to scaling up.
Assume these things:
- Our software is CSP web app and it's web application is '/csp/application'
- I created a new REST enabled web app called '/csp/application/v1' and for my first API I created a spec that defines an endpoint /getTeapots so the endpoint is localhost/csp/application/v1/getTeapots
- Using the /api/mgmt/ endpoint, I loaded the spec into API.TeapotLibrary