I've been trying to understand the api calls via OData. For savety measures I've renamed our server instance to xyz.
So far I found out the following: I logged on to an IFS10 environment via https://xyz:48080. I selected Entrance to Aurena for that. I opened a new tab in Google Chrome and copied in the following https://xyz:48080/main/ifsapplications/projection/v1/DocumentClassesHandling.svc/DocClassSet?$select=DocClass,DocName&$format=json This returns a list of available Doc Classes and their description (json formatted). Very nice.
Using the same URL and pasting it in FireFox (with no IFS10 running) the server returned the following: https://xyz:48080/openid-connect-provider/login?rf=p8dCXSBiIY The logon screen is shown. Seems logical to me. No idea what the parameter rf means, but I logged in (with a full access user id).
This resulted in:
Nice that the json format is even made readable (again I learned something here).
If I logout from Google Chrome IFS10 and request the same api information on document classes I get the same as in FireFox: login screen is shown.
My conclusion I need to establish a connection before I can request a REST api. Makes sense. Now my question: How do I set up such a connection, without the login screen?
The background is that I want to perform a REST api from another application. So this quesiton basically comes down to: give me an example to get results in a non IFS application from an IFS environment.
Regards, Steve
Page 1 / 1
For those that are interested, what I tried as well is that I try to create a link to IFS using PHP.
I’ve prepared a simple html page that will request which service to run (it is only rudimentary):
/* Warning: only value DocumentClassesHandling for service works in this code */ $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://xyz:48080/main/ifsapplications/projection/v1/" . $service . ".svc/$metadata#DocClassSet(DocClass,DocName)", CURLOPT_RETURNTRANSFER => 1 ));
$response = curl_exec($curl);
if($response === false) { echo 'Curl error: ' . curl_error($curl); } else { echo 'Operation completed without any errors'; }
I found a bit of documentation in the partner site (sorry for non IFS and partner employees).
This states that IFS documentation on APIs is available. I quote:
This API Documentation is feasible to used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases. (Eg: Azure Logic Apps, Microsoft Power Apps) In a CORS enabled environment, you will be able to use the link directly. Otherwise, save the generated JSON and import it. The End point will be:
I’m glad this was sorted out in the end, and I am especially glad to see you used “my” area (Docman) in your experiments. Document classes always makes people happy, is what I usually say… :)
Learned something from Daniel (IFS-er):
In UPD6 you cannot set the Compatibility Application Type.
And you do not get Basic Authentication on the “…/main/…” URLs.
In UPD8 you can flip it. That is the news.
In UPD6, you would have to make a copy of the DocumentClassesHandling projection, and change the category to “Integration” . (using Developer Studio)
When you deploy this new projection it will be available with the “../int/..” URL and with basic auth.
Since Update 8 is not yet available at this moment, I think I have to wait.
My available version is Update 6 and have no access to Developer Studio.
Points mentioned by Daniel tells me that my example of retrieving the document class info will not be working with some extensive changes.