curl --request POST \
--url https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"keys": [
"<string>"
],
"timeZone": "<string>",
"hierarchyNodeId": "<string>"
}
'import requests
url = "https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group"
payload = {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"keys": ["<string>"],
"timeZone": "<string>",
"hierarchyNodeId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
keys: ['<string>'],
timeZone: '<string>',
hierarchyNodeId: '<string>'
})
};
fetch('https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group', 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.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'keys' => [
'<string>'
],
'timeZone' => '<string>',
'hierarchyNodeId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group"
payload := strings.NewReader("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"keys\": [\n \"<string>\"\n ],\n \"timeZone\": \"<string>\",\n \"hierarchyNodeId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"keys\": [\n \"<string>\"\n ],\n \"timeZone\": \"<string>\",\n \"hierarchyNodeId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"keys\": [\n \"<string>\"\n ],\n \"timeZone\": \"<string>\",\n \"hierarchyNodeId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"key": "<string>",
"value": 123,
"previousValue": 123
}
]{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}Driver Behaviour Group Metrics
POST request to return behaviour metrics for a group for the specified period.
The value specified for the endDate cannot be before startDate and the date range between startDate and endDate should be at least 7 days.
curl --request POST \
--url https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"keys": [
"<string>"
],
"timeZone": "<string>",
"hierarchyNodeId": "<string>"
}
'import requests
url = "https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group"
payload = {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"keys": ["<string>"],
"timeZone": "<string>",
"hierarchyNodeId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
keys: ['<string>'],
timeZone: '<string>',
hierarchyNodeId: '<string>'
})
};
fetch('https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group', 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.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'keys' => [
'<string>'
],
'timeZone' => '<string>',
'hierarchyNodeId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group"
payload := strings.NewReader("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"keys\": [\n \"<string>\"\n ],\n \"timeZone\": \"<string>\",\n \"hierarchyNodeId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"keys\": [\n \"<string>\"\n ],\n \"timeZone\": \"<string>\",\n \"hierarchyNodeId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/performance/public/v1/customer/{customerId}/driverbehaviourmetrics/group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"keys\": [\n \"<string>\"\n ],\n \"timeZone\": \"<string>\",\n \"hierarchyNodeId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"key": "<string>",
"value": 123,
"previousValue": 123
}
]{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Request parameters for group behaviour metrics including date range, metrics keys, and group identifier
Start date and time for the behaviour metrics period. Format: yyyy-MM-dd'T'HH:mm:ss in UTC.
End date and time for the behaviour metrics period. Format: yyyy-MM-dd'T'HH:mm:ss in UTC.
Array of keys for the KPI to return details for. Possible values:
- DrivingPercentage (Cleaner KPI)
- SpeedCompliance (Safe Speed KPI)
- HarshEventsPercentage (Smoother KPI)
Timezone identifier for the request (e.g., 'Europe/London', 'UTC')
Unique identifier of an existing group to retrieve behaviour metrics for
Was this page helpful?
