Client and Session details API
Kloudspot API for Client and Session Data
All Kloudspot public data APIs are protected with OAuth Token-based authentication. The OAuth token can be generated using the login API with app id and secret. A token is valid for 10 minutes for multiple API calls. For the Kloudspot management and monitoring system (KloudManage), the app id and secret can be found in the SETTINGS → Third-Party Integration tab → Kloudspot API Key Section.
1. Login API
A. Example Request
curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'X-CSRF-TOKEN: ' -d '{
"id": "aac1fa9ec05d47f8aab8828bae22cbc6",
"secretKey": "eb1ca9c96dc9461c"
}' 'https://stage.kloudspot.com/epsilon/api/public/v1/auth/login'
B. Success Response
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwcmVta3VtYXIuc0B0YXRhY29tbXVuaWNhdGlvbnMuY29tIiwiYXV0aCI6IlJPTEVfQUNDT1VOVF9BRE1JTixST0xFX0FDQ09VTlQsUk9MRV9jZjQ5NmMzNGMzNmI0ZTI2YjM3OTRmOTdhODc2ODgzNCIsImV4cCI6MTY1Mjk0OTU1M30.kRRD5FBMGbHKAcIYjKFm6EGylC24bRTvfnL5CH6s_TAGe9_jXlf2T5E6sPj1ooXiJz1wyJAzFh-garWK1Q2sKQ
C. Invalid Response
You do not have access to the requested resource.
2. Client and Session API
A. Example Request
curl --location --request GET 'https://stage.kloudspot.com/epsilon/api/public/v1/report/ap/clientSession/1688083200000/518400000' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJiYW5nYWxvcmVsYWJAa3Nwb3QuY29tIiwiYXV0aCI6IlJPTEVfY2U5M2YwMDBhOGQyNGRiMTgzN2EwOTJlMWQ4NWNmZWYsUk9MRV9BQ0NPVU5UX0FETUlOLFJPTEVfQUNDT1VOVCIsImV4cCI6MTY4ODY1MzY1Nn0.QKDnWomUat5GDEQIC_o5BYk7iLZWrdz420p2VUXRerkOAZOhtRRh0ow9xjZSTQaB0ndqf9MrL54Ko0oIVYMWag' \
--header 'Cookie: JSESSIONID=2EBDE01CD4B16D5EFAE36A90BDF92D69'
B. Request Constraints
URL Pattern:
https://stage.kloudspot.com/epsilon/api/public/v1/report/ap/clientSession/{starttime}/{duration}
- Start time – This is the start time in milliseconds since the epoch. It should not be less than 90 days ago.
- Duration – This is the duration for which data is needed to be fetched. The maximum allowed duration is 7 days. It must be in milliseconds.
Above defined constraints must be followed to obtain the data. Sample Success Response
C. Response
Successful Response
{
"error": false,
"errorCode": null,
"errorMessage": null,
"data": [
{
"First connection date": "2023-06-30T05:31:42 IST",
"Last connection date": "2023-07-01T05:26:42 IST",
"Venue ID": "9db00a31f5df4360bbbc8a351e6feb11",
"Subscription to receive campaigns": "true",
"Visitor ID": "7e:85:2d:4d:f8:0b",
"Birth Date" : "2001-08-28",
"Connection Source": "Form",
"Number of visits": "1",
"Venue Name": "IQ Gamma Lab",
"MAC Address": "7e:85:2d:4d:f8:0b"
},
{
"First connection date": "2023-06-30T17:06:42 IST",
"Last connection date": "2023-06-30T23:31:42 IST",
"Venue ID": "9db00a31f5df4360bbbc8a351e6feb11",
"Subscription to receive campaigns": "false",
"Visitor ID": "dc:fb:48:70:5b:ac",
"Connection Source": "Facebook",
"Number of visits": "2",
"Venue Name": "IQ Gamma Lab",
"MAC Address": "dc:fb:48:70:5b:ac"
},
{
"First connection date": "2023-07-03T12:13:07 IST",
"Last connection date": "2023-07-03T12:49:40 IST",
"Venue ID": "5a3a9f4d10f04b00086d4d8b",
"Subscription to receive campaigns": "false",
"Visitor ID": "ec:63:d7:04:4c:af",
"Connection Source": "Form",
"Venue Name": "RTP Lab",
"Number of visits": "1",
"MAC Address": "ec:63:d7:04:4c:af"
}
]
}
The API will include below fields in the response.
Visitor ID: This will be the MAC address of the user. As mac acts as key to uniquely identify among users.
Venue ID: The ID for the Venue
Venue Name: Name of the Venue
Birthdate: The birthdate of the user is entered in the splash page. If the birthdate form field is opted in, then this field will be included in the response.
First connection date: First seen of the user when he/she connected to the SSID.
Last connection date: Last seen of the user when he/she disconnected from the SSID.
MAC Address: The MAC Address of the user’s device.
Number of visits: Total number of sessions for that user.
Connection Source (Form or Social Network): If the user used social login, then the name of the social login platform will be included. Otherwise, the source will be form login.
Subscription to receive campaigns: If the user checked the checkbox on the splash page, then the value will be true. Otherwise, the value will be false.