API Integration
Dernière mise à jour
Cet article vous a-t-il été utile ?
Dernière mise à jour
Cet article vous a-t-il été utile ?
The dashboards prepared in the Biwee can be integrated within another application. The Biwee Integration API takes care of the mechanism and communication between Biwee and your application.
For the integration, the dashboards are rendered in HTML format and embedded via an iframe tag. It is then possible to embed them in a website, a web application or a classic application.
This example presents the integration of a dashboard within a php application.
1. I create a dashboard in Biwee.
2. After saving it, in the "Share" menu, I check the box "Accessible in API", the API code is no longer grayed out.
3. The specific integration code for this dashboard is presented to me:
4. I copy / paste the php code within my site:
In this example, I use as session id the one of the php session returned by session_id(). The session id will be used when the user logs out of my application. The same session id must be used for the display of the dashboard and for the closing of the session.
5. I add in my application the logout code prepared by Biwee. This code ensures that when a user of my application logs out, they can no longer access the dashboards.
Result:
GET
https://www.biwee.fr/Api/GetToken
Retrieve a dashboard opening token.
apiKey
String
Your API Key
sessionID
String
ID that can be used to invalidate the token
dashboardGuid
String
Identifier of the dashboard
SQLparameters
String
Possible SQL parameters (Param1=Value1;Param2=Value2)
POST
https://www.biwee.fr/Api/GetToken
Retrieve a token by being able to replace the connection string.
apiKey
String
Your API Key
sessionID
String
ID that can be used to invalidate the token
dashboardGuid
String
Identifier of the dashboard
SQLparameters
String
Possible SQL parameters (Param1=Value1;Param2=Value2)
Content-Length
String
Content size
Content-Type
String
text/plain
Content
String
Connection chain that the connector should use
It is possible when calling the API to specify additional elements by sending a serialized JSON object.
This object can contain the following fields:
connectionString
user
organization
customInfo
The "connectionString" field allows you to specify a connection string and therefore to make the dashboard retrieve data from a different location than the one configured in the software.
The "user", "organization", and "customInfo" fields allow additional data to be added to our database for statistical analysis purposes.
This example presents the integration of a dashboard within a php application. This dashboard uses data from a database with a replaced connection string.
Example using part of the code generated from the software:
GET
https://www.biwee.fr/Tdb
Allows to display a dashboard. Can be used as a URL in a browser or in an iframe. By default the background of the page containing the dashboard is white. It is however possible to specify another color.
token
String
Dashboard opening token
color
String
Color of the dashboard texts
ex : cyan , $7FFF00
background-color
String
Color of the dashboard texts
ex : cyan , $7FFF00
POST
https://www.biwee.fr/Api/GetToken
Retrieve a token by being able to replace the connection string with additional logs.
apiKey
String
Your API Key
sessionID
String
ID that can be used to invalidate the token
dashboardGuid
String
Identifier of the dashboard
SQLparameters
String
Possible SQL parameters (Param1=Value1;Param2=Value2)
Content-Length
String
Content size
Content-Type
String
application/json
Content
object
JSON object that can contain the following fields:
- Connection String
- User
- Organization
- CustomInfo
(Allows for additional data to be added to our database for statistical analysis purposes)
Warning: when using hexadecimal notation, the usual # must be replaced with a $.