车辆端点
DELETE /api/1/vehicles/{vehicle_tag}/drivers
取消驾驶员对车辆的访问。共享用户只能删除自己的访问权限。所有者可以删除共享访问权限或自己的访问权限。
POST /api/1/vehicles/fleet_telemetry_config
配置车辆以连接到自托管fleet-telemetry 服务器。 该端点并发度为1(同时调用多个会返回状态429)。 一次调用即可配置多辆车辆。该端点可用于创建或更新配置。
如果未配置任何指定的 VIN,则响应将包含“skipped_vehicles”。 VIN 可能被拒绝的原因:
missing_key
:您的虚拟钥匙尚未添加到车辆中。 分发您的公钥。unsupported_hardware
:Pre -2021 Model S 和 X 不受支持。unsupported_firmware
:运行固件版本早于 2023.20 的车辆。max_configs
:已存在五个配置的车辆。
车辆可以配置为同时向 3 个第三方应用程序传输数据。
DELETE /api/1/vehicles/{vehicle_tag}/fleet_telemetry_config
Disconnects vehicles to stream telemetry data to self hosted fleet-telemetry server.
GET /api/1/vehicles/{vehicle_tag}/fleet_telemetry_config
Fetches a vehicle's fleet telemetry config. synced
set to true
means the vehicle has adopted the target config. synced
set to false
means the vehicle will attempt to adopt the target config when it next establishes a backend connection. Note that if vehicle only allows 3 partners per vehicle for streaming via fleet telemetry. If limit_reached
set to true
, vehicle has reached max supported applications and new fleet streaming requests cannot be added to the vehicle
POST /api/1/vehicles/fleet_telemetry_config_jws
通过接受签名配置令牌,将车辆配置为连接到自托管的 fleet-telemetry 服务器。
不建议直接使用此端点。
配置车辆的推荐方法是通过 vehicle-command 代理调用 fleet_telemetry_config create 端点。这将自动使用配置的私钥对配置进行签名,并将请求转发到此端点。
如果直接使用此端点,则必须使用 NIST P-256 和 SHA-256 使用 Schnorr 签名算法创建 JWS 令牌。
VIN可能会因以下几个原因被拒绝:
missing_key
: 虚拟钥匙尚未添加到车辆。 分发公钥。unsupported_hardware
: 不支持2021年之前的Model S和X。unsupported_firmware
: 车辆运行的固件版本早于2024.26。
POST /api/1/vehicles/{vehicle_tag}/invitations
- 每个邀请链接仅供一次性使用,并在24小时后过期。
- 使用邀请的帐户将获得Tesla应用程序对车辆的驾驶员访问权限,从而可以执行以下操作:
- 查看车辆的实时位置。
- 发送远程命令。
- 将用户的特斯拉个人资料下载到车辆
- 要删除访问权限,请使用撤销API
- 如果用户没有安装Tesla应用程序,他们将被转跳至网页获得更多指引。
- 当用户靠近车辆时,可以使用Tesla应用程序将手机设置为钥匙。
- Tesla应用程序访问权限提供驾驶员权限,但不包含所有所有者功能。
- 一次最多可以添加五个驾驶员。
- 该API不需要车辆在线。
GET /api/1/vehicles/{vehicle_tag}/vehicle_data
对车辆进行实时呼叫。如果车辆离线,对于运行固件版本2023.38+的车辆,需要location_data来获取车辆位置。这将导致位置共享图标显示在车辆UI上。