[{"data":1,"prerenderedAt":292},["ShallowReactive",2],{"docs-navigation":3,"docs:\u002Fdocs\u002Fapi\u002Fstreaming":84,"docs-surround:\u002Fdocs\u002Fapi\u002Fstreaming":287},[4,18,43,71],{"title":5,"path":6,"stem":7,"children":8,"page":17},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[9,13],{"title":10,"path":11,"stem":12},"Initial Setup","\u002Fdocs\u002Fgetting-started\u002Finitial-setup","docs\u002F1.getting-started\u002F1.initial-setup",{"title":14,"path":15,"stem":16},"Customer Link","\u002Fdocs\u002Fgetting-started\u002Fcustomer-link","docs\u002F1.getting-started\u002F2.customer-link",false,{"title":19,"path":20,"stem":21,"children":22,"page":17},"Portal","\u002Fdocs\u002Fportal","docs\u002F2.portal",[23,27,31,35,39],{"title":24,"path":25,"stem":26},"Users and Roles","\u002Fdocs\u002Fportal\u002Fusers","docs\u002F2.portal\u002F1.users",{"title":28,"path":29,"stem":30},"Brand and Redirect URLs","\u002Fdocs\u002Fportal\u002Fbrand","docs\u002F2.portal\u002F2.brand",{"title":32,"path":33,"stem":34},"API Keys","\u002Fdocs\u002Fportal\u002Fapi-keys","docs\u002F2.portal\u002F3.api-keys",{"title":36,"path":37,"stem":38},"Webhook","\u002Fdocs\u002Fportal\u002Fwebhook","docs\u002F2.portal\u002F4.webhook",{"title":40,"path":41,"stem":42},"Vehicle Config","\u002Fdocs\u002Fportal\u002Fvehicle-config","docs\u002F2.portal\u002F5.vehicle-config",{"title":44,"path":45,"stem":46,"children":47,"page":17},"API","\u002Fdocs\u002Fapi","docs\u002F3.api",[48,52,56,60,64,67],{"title":49,"path":50,"stem":51},"Introduction","\u002Fdocs\u002Fapi\u002Fintroduction","docs\u002F3.api\u002F1.introduction",{"title":53,"path":54,"stem":55},"Consented Products","\u002Fdocs\u002Fapi\u002Fproducts","docs\u002F3.api\u002F2.products",{"title":57,"path":58,"stem":59},"Vehicles and Energy Sites","\u002Fdocs\u002Fapi\u002Fvehicles-and-energy-sites","docs\u002F3.api\u002F3.vehicles-and-energy-sites",{"title":61,"path":62,"stem":63},"Streaming","\u002Fdocs\u002Fapi\u002Fstreaming","docs\u002F3.api\u002F4.streaming",{"title":36,"path":65,"stem":66},"\u002Fdocs\u002Fapi\u002Fwebhook","docs\u002F3.api\u002F5.webhook",{"title":68,"path":69,"stem":70},"Errors and Limits","\u002Fdocs\u002Fapi\u002Ferrors-and-limits","docs\u002F3.api\u002F6.errors-and-limits",{"title":72,"path":73,"stem":74,"children":75,"page":17},"About","\u002Fdocs\u002Fabout","docs\u002F99.about",[76,80],{"title":77,"path":78,"stem":79},"Terms Of Service","\u002Fdocs\u002Fabout\u002Fterms","docs\u002F99.about\u002F2.terms",{"title":81,"path":82,"stem":83},"Privacy Policy","\u002Fdocs\u002Fabout\u002Fprivacy","docs\u002F99.about\u002F3.privacy",{"id":85,"title":61,"body":86,"description":281,"extension":282,"meta":283,"navigation":284,"path":62,"seo":285,"stem":63,"__hash__":286},"docs\u002Fdocs\u002F3.api\u002F4.streaming.md",{"type":87,"value":88,"toc":275},"minimark",[89,98,103,110,122,136,139,143,146,206,212,233,236,242,246,256,262],[90,91,92,93,97],"p",{},"A shared vehicle streams the Fleet Telemetry fields in its streaming config. You receive that data on your ",[94,95,96],"a",{"href":65},"webhook",", or with Server-Sent Events.",[99,100,102],"h2",{"id":101},"default-config","Default config",[90,104,105,106,109],{},"When a customer shares a vehicle, Teslemetry applies your business's default config to it once. You set the default on the ",[94,107,108],{"href":41},"Vehicle config"," page, or with the API:",[111,112,119],"pre",{"className":113,"code":115,"filename":116,"language":117,"meta":118},[114],"language-text","curl --request PUT --header \"Authorization: Bearer {token}\" --header 'Content-Type: application\u002Fjson' \\\n  --data '{\"fields\":{\"BatteryLevel\":{\"interval_seconds\":300},\"ChargeState\":{\"interval_seconds\":60}}}' \\\n  'https:\u002F\u002Fapi.teslemetry.pro\u002Fapi\u002Fbusiness\u002Fconfig\u002Fdefault'\n","Curl Example","text","",[120,121,115],"code",{"__ignoreMap":118},[90,123,124,127,128,131,132,135],{},[120,125,126],{},"GET \u002Fapi\u002Fbusiness\u002Fconfig\u002Fdefault"," returns the current default, or ",[120,129,130],{},"null"," if none is set. Field names the API does not recognise are dropped, and listed in the response's ",[120,133,134],{},"ignoredFields",".",[90,137,138],{},"Changing the default does not change vehicles already shared.",[99,140,142],{"id":141},"one-vehicles-config","One vehicle's config",[90,144,145],{},"After a vehicle is shared, you manage its streaming yourself:",[147,148,149,162],"table",{},[150,151,152],"thead",{},[153,154,155,159],"tr",{},[156,157,158],"th",{},"Request",[156,160,161],{},"Effect",[163,164,165,176,186,196],"tbody",{},[153,166,167,173],{},[168,169,170],"td",{},[120,171,172],{},"GET \u002Fapi\u002Fconfig\u002F{vin}",[168,174,175],{},"The vehicle's current streaming config.",[153,177,178,183],{},[168,179,180],{},[120,181,182],{},"PATCH \u002Fapi\u002Fconfig\u002F{vin}",[168,184,185],{},"Adds or changes the fields you send, and keeps the rest.",[153,187,188,193],{},[168,189,190],{},[120,191,192],{},"POST \u002Fapi\u002Fconfig\u002F{vin}",[168,194,195],{},"Replaces the whole config.",[153,197,198,203],{},[168,199,200],{},[120,201,202],{},"DELETE \u002Fapi\u002Fconfig\u002F{vin}",[168,204,205],{},"Stops streaming from the vehicle.",[111,207,210],{"className":208,"code":209,"filename":116,"language":117,"meta":118},[114],"curl --request PATCH --header \"Authorization: Bearer {token}\" --header 'Content-Type: application\u002Fjson' \\\n  --data '{\"fields\":{\"VehicleSpeed\":{\"interval_seconds\":10}}}' \\\n  'https:\u002F\u002Fapi.teslemetry.pro\u002Fapi\u002Fconfig\u002F{vin}'\n",[120,211,209],{"__ignoreMap":118},[90,213,214,215,218,219,222,223,226,227,135],{},"Each field takes ",[120,216,217],{},"interval_seconds",", and optionally ",[120,220,221],{},"minimum_delta"," and ",[120,224,225],{},"resend_interval_seconds",". The limits and defaults for each field are at ",[94,228,232],{"href":229,"rel":230},"https:\u002F\u002Fapi.teslemetry.com\u002Ffields.json",[231],"nofollow","api.teslemetry.com\u002Ffields.json",[90,234,235],{},"A vehicle has one streaming config. If the customer also uses Teslemetry themselves, or shares the vehicle with another business, the same config serves everyone.",[90,237,238,241],{},[120,239,240],{},"GET \u002Fapi\u002F1\u002Fvehicles\u002F{vin}\u002Ffleet_telemetry_errors"," lists errors the vehicle reported while streaming.",[99,243,245],{"id":244},"server-sent-events","Server-Sent Events",[90,247,248,251,252,255],{},[120,249,250],{},"GET \u002Fsse\u002F{vin}"," streams a vehicle's data as Server-Sent Events. ",[120,253,254],{},"GET \u002Fsse\u002F{vin}\u002F{field}"," streams a single field.",[111,257,260],{"className":258,"code":259,"filename":116,"language":117,"meta":118},[114],"curl --no-buffer --header \"Authorization: Bearer {token}\" 'https:\u002F\u002Fapi.teslemetry.pro\u002Fsse\u002F{vin}'\n",[120,261,259],{"__ignoreMap":118},[90,263,264,265,268,269,274],{},"Use the ",[120,266,267],{},"topics"," query parameter to choose which event types you receive. See the ",[94,270,273],{"href":271,"rel":272},"https:\u002F\u002Fapi.teslemetry.pro\u002Fdocs\u002F",[231],"API reference"," for the event names.",{"title":118,"searchDepth":276,"depth":276,"links":277},2,[278,279,280],{"id":101,"depth":276,"text":102},{"id":141,"depth":276,"text":142},{"id":244,"depth":276,"text":245},"Configuring Fleet Telemetry, and receiving it with Server-Sent Events.","md",{},true,{"title":61,"description":281},"vfmlyJ3lPG0en3uwgsF9QHpsmg81McuJXvkDdoXvoiI",[288,290],{"title":57,"path":58,"stem":59,"description":289,"children":-1},"Reading data from, and sending commands to, the products your customers share.",{"title":36,"path":65,"stem":66,"description":291,"children":-1},"Setting your business webhook with the API, and the messages it receives.",1791455699626]