curl "https://connect.maklare.vitec.net/BusinessIntelligence/LiveData/Report?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00" -X GET -H "Authorization: basic {Base64 kodad användarnamn och lösenord}"
Dokumentation för API-funktioner
GET BusinessIntelligence/LiveData/Report
Hämtar sammanställning av användaraktivitet, datumintervallet får inte överstiga två månader
Request Information
URI Parameters
Response Information
Resource Description
Hämtar sammanställning av användaraktivitet, datumintervallet får inte överstiga två månader
LiveDataReport
Kodexempel
Testformulär
Text input
Response Formats
Namn | Beskrivning | Typ | Information |
customerId | Kund-id | string |
Krävs |
dateFrom | Datum från | date |
Krävs |
dateTo | Datum till | date |
Krävs |
Namn | Beskrivning | Typ | Information |
Reports | Collection of LiveDataUserOfficeReport |
$URL = "https://connect.maklare.vitec.net/BusinessIntelligence/LiveData/Report?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00"
Invoke-WebRequest -Uri $URL -Method GET -Headers @{"authorization" = "basic {Base64 kodad användarnamn och lösenord}"}
// HttpClientInstance ska deklareras som en singleton
// public static readonly HttpClient HttpClientInstance = new HttpClient {
// BaseAddress = new Uri("https://connect.maklare.vitec.net"),
// DefaultRequestHeaders = {
// Authorization = new AuthenticationHeaderValue("Basic", "{Base64 kodad användarnamn och lösenord}")
// }
// }
using (var response = await HttpClientInstance.GetAsync("BusinessIntelligence/LiveData/Report?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00")) {
if (response.StatusCode == HttpStatusCode.Unauthorized) {
// Authorization headern är inte korrekt
}
if (response.StatusCode == HttpStatusCode.Forbidden) {
// Begärt data som det saknas åtkomst till
}
if (response.StatusCode == HttpStatusCode.InternalServerError) {
// Oväntat fel, kontakta Vitec
}
if (response.StatusCode == HttpStatusCode.BadRequest) {
var json = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<dynamic>(json);
// Hantera valideringsfel, presenteras i resultatet
}
var json = await response.Content.ReadAsStringAsync();
// JsonConvert finns i biblioteket Newtonsoft.Json
var result = JsonConvert.DeserializeObject<dynamic>(json);
var reports = result.reports.Value ;
// TODO: Gör något med resultatet
}
$URL = "https://connect.maklare.vitec.net/BusinessIntelligence/LiveData/Report?customerId=StringValue&dateFrom=2015-01-01T12:00:00&dateTo=2015-01-01T12:00:00";
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERNAME, "{Användarnamn}");
curl_setopt($ch, CURLOPT_PASSWORD, "{Lösenord}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $URL);
$result = curl_exec($ch);
if (curl_errno($ch)) {
die(curl_getinfo($ch));
}
$info = curl_getinfo($ch);
curl_close($ch);
$http_code = $info["http_code"];
if ($http_code == 401) {
// Användarnamnet eller lösenordet är felaktigt
}
if ($http_code == 403) {
// Begärt data som det saknas åtkomst till
}
if ($http_code == 500) {
// Oväntat fel, kontakta Vitec
}
if ($http_code == 400) {
$json = json_decode($result, true);
// Hantera valideringsfel, presenteras i $json
}
$field_on_result = $result["reports"];
// TODO: Gör något med resultatet
Resultat av begäran
{ "reports": [ { "customerId": "sample string 1", "userId": "sample string 2", "days": [ { "day": "2024-11-21", "admissionBuyersFollowedUp": 2, "admissionSellersFollowedUp": 3, "autoTipsAccepted": 4, "autoTipsRejected": 5, "autoTipsSent": 6, "buyerMeetingCreated": 7, "buyerMeetingFollowedUp": 8, "comebackMeetingsCreated": 9, "contactLeavingUpdated": 10, "contactSearchingCreated": 11, "contactOrderCreatedEstateValue": 12, "contactOrderCreatedFinalPrices": 13, "leadsProcessed": 14, "newAssignments": 15, "partnerLeadsSent": 16, "sellerMeetingCreated": 17, "sellerMeetingFollowedUp": 18, "tipsProcessed": 19, "tipsSent": 20, "viewingFollowedUp": 21 }, { "day": "2024-11-21", "admissionBuyersFollowedUp": 2, "admissionSellersFollowedUp": 3, "autoTipsAccepted": 4, "autoTipsRejected": 5, "autoTipsSent": 6, "buyerMeetingCreated": 7, "buyerMeetingFollowedUp": 8, "comebackMeetingsCreated": 9, "contactLeavingUpdated": 10, "contactSearchingCreated": 11, "contactOrderCreatedEstateValue": 12, "contactOrderCreatedFinalPrices": 13, "leadsProcessed": 14, "newAssignments": 15, "partnerLeadsSent": 16, "sellerMeetingCreated": 17, "sellerMeetingFollowedUp": 18, "tipsProcessed": 19, "tipsSent": 20, "viewingFollowedUp": 21 } ] }, { "customerId": "sample string 1", "userId": "sample string 2", "days": [ { "day": "2024-11-21", "admissionBuyersFollowedUp": 2, "admissionSellersFollowedUp": 3, "autoTipsAccepted": 4, "autoTipsRejected": 5, "autoTipsSent": 6, "buyerMeetingCreated": 7, "buyerMeetingFollowedUp": 8, "comebackMeetingsCreated": 9, "contactLeavingUpdated": 10, "contactSearchingCreated": 11, "contactOrderCreatedEstateValue": 12, "contactOrderCreatedFinalPrices": 13, "leadsProcessed": 14, "newAssignments": 15, "partnerLeadsSent": 16, "sellerMeetingCreated": 17, "sellerMeetingFollowedUp": 18, "tipsProcessed": 19, "tipsSent": 20, "viewingFollowedUp": 21 }, { "day": "2024-11-21", "admissionBuyersFollowedUp": 2, "admissionSellersFollowedUp": 3, "autoTipsAccepted": 4, "autoTipsRejected": 5, "autoTipsSent": 6, "buyerMeetingCreated": 7, "buyerMeetingFollowedUp": 8, "comebackMeetingsCreated": 9, "contactLeavingUpdated": 10, "contactSearchingCreated": 11, "contactOrderCreatedEstateValue": 12, "contactOrderCreatedFinalPrices": 13, "leadsProcessed": 14, "newAssignments": 15, "partnerLeadsSent": 16, "sellerMeetingCreated": 17, "sellerMeetingFollowedUp": 18, "tipsProcessed": 19, "tipsSent": 20, "viewingFollowedUp": 21 } ] } ] }
<LiveDataReport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Vitec.Housing.Connect.Api.Models.BusinessIntelligense"> <Reports> <LiveDataUserOfficeReport> <CustomerId>sample string 1</CustomerId> <Days> <LiveData> <AdmissionBuyersFollowedUp>2</AdmissionBuyersFollowedUp> <AdmissionSellersFollowedUp>3</AdmissionSellersFollowedUp> <AutoTipsAccepted>4</AutoTipsAccepted> <AutoTipsRejected>5</AutoTipsRejected> <AutoTipsSent>6</AutoTipsSent> <BuyerMeetingCreated>7</BuyerMeetingCreated> <BuyerMeetingFollowedUp>8</BuyerMeetingFollowedUp> <ComebackMeetingsCreated>9</ComebackMeetingsCreated> <ContactLeavingUpdated>10</ContactLeavingUpdated> <ContactOrderCreatedEstateValue>12</ContactOrderCreatedEstateValue> <ContactOrderCreatedFinalPrices>13</ContactOrderCreatedFinalPrices> <ContactSearchingCreated>11</ContactSearchingCreated> <Day>2024-11-21T10:14:24.314417+01:00</Day> <LeadsProcessed>14</LeadsProcessed> <NewAssignments>15</NewAssignments> <PartnerLeadsSent>16</PartnerLeadsSent> <SellerMeetingCreated>17</SellerMeetingCreated> <SellerMeetingFollowedUp>18</SellerMeetingFollowedUp> <TipsProcessed>19</TipsProcessed> <TipsSent>20</TipsSent> <ViewingFollowedUp>21</ViewingFollowedUp> </LiveData> <LiveData> <AdmissionBuyersFollowedUp>2</AdmissionBuyersFollowedUp> <AdmissionSellersFollowedUp>3</AdmissionSellersFollowedUp> <AutoTipsAccepted>4</AutoTipsAccepted> <AutoTipsRejected>5</AutoTipsRejected> <AutoTipsSent>6</AutoTipsSent> <BuyerMeetingCreated>7</BuyerMeetingCreated> <BuyerMeetingFollowedUp>8</BuyerMeetingFollowedUp> <ComebackMeetingsCreated>9</ComebackMeetingsCreated> <ContactLeavingUpdated>10</ContactLeavingUpdated> <ContactOrderCreatedEstateValue>12</ContactOrderCreatedEstateValue> <ContactOrderCreatedFinalPrices>13</ContactOrderCreatedFinalPrices> <ContactSearchingCreated>11</ContactSearchingCreated> <Day>2024-11-21T10:14:24.314417+01:00</Day> <LeadsProcessed>14</LeadsProcessed> <NewAssignments>15</NewAssignments> <PartnerLeadsSent>16</PartnerLeadsSent> <SellerMeetingCreated>17</SellerMeetingCreated> <SellerMeetingFollowedUp>18</SellerMeetingFollowedUp> <TipsProcessed>19</TipsProcessed> <TipsSent>20</TipsSent> <ViewingFollowedUp>21</ViewingFollowedUp> </LiveData> </Days> <UserId>sample string 2</UserId> </LiveDataUserOfficeReport> <LiveDataUserOfficeReport> <CustomerId>sample string 1</CustomerId> <Days> <LiveData> <AdmissionBuyersFollowedUp>2</AdmissionBuyersFollowedUp> <AdmissionSellersFollowedUp>3</AdmissionSellersFollowedUp> <AutoTipsAccepted>4</AutoTipsAccepted> <AutoTipsRejected>5</AutoTipsRejected> <AutoTipsSent>6</AutoTipsSent> <BuyerMeetingCreated>7</BuyerMeetingCreated> <BuyerMeetingFollowedUp>8</BuyerMeetingFollowedUp> <ComebackMeetingsCreated>9</ComebackMeetingsCreated> <ContactLeavingUpdated>10</ContactLeavingUpdated> <ContactOrderCreatedEstateValue>12</ContactOrderCreatedEstateValue> <ContactOrderCreatedFinalPrices>13</ContactOrderCreatedFinalPrices> <ContactSearchingCreated>11</ContactSearchingCreated> <Day>2024-11-21T10:14:24.314417+01:00</Day> <LeadsProcessed>14</LeadsProcessed> <NewAssignments>15</NewAssignments> <PartnerLeadsSent>16</PartnerLeadsSent> <SellerMeetingCreated>17</SellerMeetingCreated> <SellerMeetingFollowedUp>18</SellerMeetingFollowedUp> <TipsProcessed>19</TipsProcessed> <TipsSent>20</TipsSent> <ViewingFollowedUp>21</ViewingFollowedUp> </LiveData> <LiveData> <AdmissionBuyersFollowedUp>2</AdmissionBuyersFollowedUp> <AdmissionSellersFollowedUp>3</AdmissionSellersFollowedUp> <AutoTipsAccepted>4</AutoTipsAccepted> <AutoTipsRejected>5</AutoTipsRejected> <AutoTipsSent>6</AutoTipsSent> <BuyerMeetingCreated>7</BuyerMeetingCreated> <BuyerMeetingFollowedUp>8</BuyerMeetingFollowedUp> <ComebackMeetingsCreated>9</ComebackMeetingsCreated> <ContactLeavingUpdated>10</ContactLeavingUpdated> <ContactOrderCreatedEstateValue>12</ContactOrderCreatedEstateValue> <ContactOrderCreatedFinalPrices>13</ContactOrderCreatedFinalPrices> <ContactSearchingCreated>11</ContactSearchingCreated> <Day>2024-11-21T10:14:24.314417+01:00</Day> <LeadsProcessed>14</LeadsProcessed> <NewAssignments>15</NewAssignments> <PartnerLeadsSent>16</PartnerLeadsSent> <SellerMeetingCreated>17</SellerMeetingCreated> <SellerMeetingFollowedUp>18</SellerMeetingFollowedUp> <TipsProcessed>19</TipsProcessed> <TipsSent>20</TipsSent> <ViewingFollowedUp>21</ViewingFollowedUp> </LiveData> </Days> <UserId>sample string 2</UserId> </LiveDataUserOfficeReport> </Reports> </LiveDataReport>