Picture of Wim 4127
Registered 6 years 309 days
Wim 4127 Tuesday, 16 November 2021, 03:20 PM
How to use the files API from a C++ app
Hi,

in our app C++ backend we need to get/put files on the app platform, e.g. in the announcements folder of the files app. How can we use the files-api? (and is this similar to the devices API that we can use from our C++ back-end (App service APIs)).

How do we approach this? Is there any information available? The documentation of the client API for example is empty at https://sdk.innovaphone.com/13r2/web1/com.innovaphone.files/com.innovaphone.files.htm but that's not even applicable for the backend.

Kind regards,

Wim
Picture of Wim 4127
Registered 6 years 309 days
Wim 4127 Thursday, 18 November 2021, 09:21 AM
Re: How to use the files API from a C++ app
Hi, any info on this topic? Or any alternative solution (dbfiles, webdavservice)? Please advise on how we can achieve this goal...
2013
Moderator Registered 16 years 72 days
Guntram Diehl (innovaphone) Friday, 19 November 2021, 09:23 AM
Re: How to use the files API from a C++ app
Appart from what Andreas said, it is not recommended to write file to the file system. This will break redundancy as we currently implementing it. We will replicate the databases of an AP to a standby AP, but not files.
Picture of Wim 4127
Registered 6 years 309 days
Wim 4127 Thursday, 25 November 2021, 09:45 PM
Re: How to use the files API from a C++ app
As mentioned in the ticket we want to use the files api, which seems the right choice but is not available as documentation, and not available as a services API in C++ . We will have reverse engineer the client API unfortunatly and work around the Services discovery mechanism (because it isn't "published" AIP) and get the URLs by interpreting all of these websockets ourselves...
Andreas Fink
Moderator Registered 13 years 109 days
Andreas Fink (innovaphone) Thursday, 18 November 2021, 04:26 PM in response to Wim 4127
Re: How to use the files API from a C++ app
Hello Wim,

we will publish the files-api documentation soon, but it could be not suitable for your needs (depending what your use case is).

What exactly is your use case? Only announcements are required? Or do you need other file types (files-api supports only announcements at the moment).

You could also implement handling of the GET/PUT requests directly in your app, and use DbFiles (https://sdk.innovaphone.com/13r2/sdk/common/interface/dbfiles.htm) interface to store the files in the DB of your app instance.

If more than GET/PUT is required, you can replace it by WebDAV implementation in your App (https://sdk.innovaphone.com/13r2/sdk/common/lib/webdavservice.htm)

Best Regards
Andreas Fink
Picture of Wim 4127
Registered 6 years 309 days
Wim 4127 Friday, 19 November 2021, 11:48 AM
Re: How to use the files API from a C++ app
In this specific scenario, the first idea is indeed to get a number of audio files in the announcements directory so that they can be selected in the other applications where you can select audio files.

But it must happen from withing the C++ backend application.
Regarding that. In the documentation at App Service Interfaces (innovaphone.com) there is documentation about client APIs and app service APIs.
- Is it correct to assume that App service APIs are for C++ backend applications, and can be used via the Services PBX APIs?
- Are the Client APIs only for the front-end, or, are they also intended to be used from withing C++ applications. And if yes, can this then be done using the Services PBX Api like we must do for example for com.innovaphone.devices?

Would it be possible to have a telephone call/conf call on this topic to get more clarity on this? As you are aware, we are working on a rather big application here and the issues are blocking our progress...


apis.jpg

← You can define your color theme preference here