Obter métricas da etapa
curl --request GET \
--url https://api.olie.ai/api/management/steps/{step}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olie.ai/api/management/steps/{step}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olie.ai/api/management/steps/{step}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/steps/{step}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/steps/{step}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.olie.ai/api/management/steps/{step}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/steps/{step}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response": true,
"metrics": {
"all_time": {
"average_time": {
"value": 184320.5,
"unit": "seconds",
"meta_data": null
},
"entry_count": {
"value": 214,
"unit": "count",
"meta_data": null
},
"max_time": {
"value": 1209600,
"unit": "seconds",
"meta_data": null
},
"min_time": {
"value": 900,
"unit": "seconds",
"meta_data": null
}
},
"last_seven_days": {
"average_time": {
"value": 93600,
"unit": "seconds",
"meta_data": null
},
"entry_count": {
"value": 9,
"unit": "count",
"meta_data": null
},
"max_time": {
"value": 259200,
"unit": "seconds",
"meta_data": null
},
"min_time": {
"value": 3600,
"unit": "seconds",
"meta_data": null
}
},
"last_thirty_days": {
"average_time": {
"value": 127440,
"unit": "seconds",
"meta_data": null
},
"entry_count": {
"value": 41,
"unit": "count",
"meta_data": null
},
"max_time": {
"value": 604800,
"unit": "seconds",
"meta_data": null
},
"min_time": {
"value": 1800,
"unit": "seconds",
"meta_data": null
}
}
}
}{
"response": false,
"message": "permission_required",
"error": "This action is unauthorized.",
"permission": "project_funnels.see_step_metrics"
}{
"response": false,
"message": "funnel_step_model_not_found",
"error": "No query results for model [App\\Models\\FunnelStep] 999999"
}funnel-steps
Obter métricas da etapa
Devolve as métricas de permanência da etapa calculadas sobre o histórico de transições: tempo médio, mínimo e máximo (em segundos) e a contagem de entradas. Cada métrica vem em três janelas — desde a criação da etapa, últimos 7 dias e últimos 30 dias. A leitura dos números e o que cada um indica sobre gargalos estão em Métricas e tempo por etapa.
GET
/
api
/
management
/
steps
/
{step}
/
metrics
Obter métricas da etapa
curl --request GET \
--url https://api.olie.ai/api/management/steps/{step}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olie.ai/api/management/steps/{step}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olie.ai/api/management/steps/{step}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/steps/{step}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/steps/{step}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.olie.ai/api/management/steps/{step}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/steps/{step}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response": true,
"metrics": {
"all_time": {
"average_time": {
"value": 184320.5,
"unit": "seconds",
"meta_data": null
},
"entry_count": {
"value": 214,
"unit": "count",
"meta_data": null
},
"max_time": {
"value": 1209600,
"unit": "seconds",
"meta_data": null
},
"min_time": {
"value": 900,
"unit": "seconds",
"meta_data": null
}
},
"last_seven_days": {
"average_time": {
"value": 93600,
"unit": "seconds",
"meta_data": null
},
"entry_count": {
"value": 9,
"unit": "count",
"meta_data": null
},
"max_time": {
"value": 259200,
"unit": "seconds",
"meta_data": null
},
"min_time": {
"value": 3600,
"unit": "seconds",
"meta_data": null
}
},
"last_thirty_days": {
"average_time": {
"value": 127440,
"unit": "seconds",
"meta_data": null
},
"entry_count": {
"value": 41,
"unit": "count",
"meta_data": null
},
"max_time": {
"value": 604800,
"unit": "seconds",
"meta_data": null
},
"min_time": {
"value": 1800,
"unit": "seconds",
"meta_data": null
}
}
}
}{
"response": false,
"message": "permission_required",
"error": "This action is unauthorized.",
"permission": "project_funnels.see_step_metrics"
}{
"response": false,
"message": "funnel_step_model_not_found",
"error": "No query results for model [App\\Models\\FunnelStep] 999999"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID da etapa do funil.
Was this page helpful?