Details
Tarayıcı Dili : Label
Kullanıcı İşletim Sistemi : Label
Otomatik bulunan İndirme Sayfası :
Otomatik bulunan İndirme Linki :
Standart İndirme Linki : download
Alpemix Web API Integration

* Purpose:

To enable you to access connection reports directly from your own server software. Information is sent and received in JSON format.

 

* Steps to Follow:

Step 1: 

Log in with your main username at https://www.alpemix.com/webapi/login.htm and learn your "Secret Key" information.

Step 2: 

Get the "Access Token" information by sending the "Secret Key" and your main username from your server-side application to our servers. "Access Token" is valid for 1 day. And it becomes invalid when the IP address changes.

Step 3:

You can access connection reports by sending the "Access Token" and related parameters to our servers.

 

* Web Address to Send Request:

https://www.alpemix.com:5900/api

 

* Getting Access Token:

Request: The information in the structure below is filled in appropriately and sent to our servers.

{
  "stepnumber": 1,
  "secretkey": "The secret key you learned from alpemix.com/webapi/login.htm",
  "mainusername": "Your main username"
}

Response: If the information is correct and no errors are received, the following response is returned:

{
  "errornumber": 0,
  "accesstoken": "...."
}

The access token you receive can be used for 1 day as long as your IP address does not change. In other cases, it must be obtained again.

 

* Getting the Connection Report:

Request: To get all the connections made yesterday, fill in the form below and send it to our servers.

{
  "stepnumber": 2,
  "accesstoken": "Learned in the previous step",
  "requestnumber": 2 
}

Request: To get all the connections made today, fill in the form below and send it to our servers.

{
  "stepnumber": 2,
  "accesstoken": "Learned in the previous step",
  "requestnumber": 1,  
  "lastxconnection": 0 
}

Request: To get the last 10 connections made today, fill in the form below and send it to our servers.

{
  "stepnumber": 2,
  "accesstoken": "Learned in the previous step",
  "requestnumber": 1,  
  "lastxconnection": 10 
}

Response: If the information is correct and no errors are received, the following response is returned:

{
 "errornumber": 0,
 "results":[ { "uid":"..", "dt":"..", "dur:":30, "dir":0, "exp":"...", "supnum":"..", "uname":"..", "ip":"..", "lip":"..", "unum":"..", "aid":"..", "tuname":"..", "tip":"..", "tlip":"..", "tunum":"..", "taid":".."  },
                 { "uid":"..", "dt":"..", "dur:":123, "dir":0, "exp":"...", "supnum":"..", "uname":"..", "ip":"..", "lip":"..", "unum":"..", "aid":"..", "tuname":"..", "tip":"..", "tlip":"..", "tunum":"..", "taid":".."  },
                 .....
                 .....
           ]
}

The results key in the returned response is in the array structure and each element contains information about a connection. It comes in descending order according to date/time.

Explanation of Keys:

uid: String type. Contains the unique number of the connection.

dt: String type. Shows the date/time when the connection started. It is in the format "hour:minute:second day\month\year". Example: "23:38:18 22\08\2024"

dur: integer type. It shows how long the connection lasted in seconds.

dir: integer type. If it is 0, connected for support. If it is 1, connected in presentation viewing mode.

exp: String type. The explanation the support staff wrote in the connection report.

supnum: String type. The support number the support staff wrote in the connection report.

uname: String type. Username of the support staff.

ip: String type. The Internet IP address of the support staff's device.

lip: String type. The local IP address of the support staff''s device.

unum: String type. The unique number of the support staff's device.

aid: String type. Alpemix id of support staff.

tuname: String type. The username of the target device to be connected.

tip: String type. The Internet IP address of the target device to be connected.

tlip: String type. The local IP address of the target device to be connected.

tunum: String type. The unique number of the target device to be connected.

taid: String type. Alpemix ID of the target device to be connected.

 

* Request Limits to be Sent to Our Servers:

To learn the Access Token, a maximum of 5 requests can be sent within 1 minute. When this limit is exceeded, the IP address to which the request is sent is blocked for a certain period of time.

To get a connection report, a maximum of 3 requests can be sent within 1 minute.

 

* Explanations of Error Codes from the Server:

If an error occurs at any stage, the errornumber value will be a non-zero value.

Example JSON:  { "errornumber": 100 }

Error codes and explanations are as follows:

200: No record found matching mainusername or secretkey.
201: The accesstoken is no longer valid because it was sent from a different IP address. It must be obtained from the beginning again.
202: The accesstoken has expired. It must be acquired again.
203: accesstoken is not valid.
204: The request limit that can be sent in 1 minute to learn the accesstoken has been exceeded. And the IP address has been blocked.
205: The limit of requests that can be sent within 1 minute to get a report has been exceeded.

100: The stepnumber value was not sent.
101: The stepnumber value was entered incorrectly.
102: secretkey or mainusername values ​​are incorrect
103: An unexpected error occurred on the server side
104: secretkey or mainusername is not in secure format
105: An unexpected error occurred while creating the accesstoken.
106: Accesstoken or requestnumber values ​​entered incorrectly
107: requestnumber value is undefined
108: An error occurred with the DB connection on the server side

 

* Sample PHP Application:

Click for sample PHP application