Repository navigation
Polestar credential: API, Connection page and documentation - #83
Merged
Merged
Conversation
PUT /connection/polestar asks the Data Portal for a token with the owner's credential and lists its VINs before storing it: a credential refused, one that reads no vehicle, or a portal that does not answer is not stored, and the vehicles listed are added to the account, under its vehicle cap. DELETE erases the credential only: migration 0024 lets a Polestar connection stay without one, its vehicles and history kept, unread by the collector until another is given. GET /connection tells its last four characters, when it was given, when it expires and whether it was refused. A vehicle's connection now names its provider; a Polestar's tells its credential's state, and the vehicle when it is no longer shared. The failure kinds know the Data Portal's. A Polestar without a family is offered its brand's variants, and the one chosen sets its family. The Volvo Data Portal's files are refused for a Polestar. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Polestar section beside the Volvo ID: the steps to the Data Portal and a link to the guide, the three values checked as the API does, the credential's last four characters, when it was given and when it expires, a reminder two weeks before, its refusal, and its removal. Each vehicle tells a credential refused or removed, a vehicle no longer shared and a domain not granted, in the vendor's words. The vehicle page tells when the car last measured its values once that is more than half an hour ago. A Polestar's settings offer its brand's variants and no import of the Volvo Data Portal's files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
runsten-api and the collector read the simulated Data Portal in task run-api, run-collector and sim.env; task connect-sim gives its development credential after the Volvo ID, and connects either alone when the scenario has no Volvo or no Polestar (commute,polestar2 in tilt). Co-Authored-By: Claude Opus 5.5 <[email protected]>
A guide to the owner's credential: creating it on the portal, the five domains to grant, giving it to Runsten, choosing the variant, the 90 days, what is read and when, and what is still in beta until checked on a real car. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closed
8 tasks done
8.3.1 carries a high severity advisory of launch-editor (the dev server's opening of a file in an editor), which fails the dependency audit. 8.3.4 is a patch release of the same line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #52 (step 4; the check on a real car remains).
API
PUT /connection/polestar(session only, the three values in the body): a token is asked for and the VINs listed before the credential is stored. Refused:400 credential_refused; reading no vehicle:409 no_vehicle; portal unreachable:502 source_unavailable; over the account's vehicle cap, counted over all its vehicles:409 too_many_vehicles. The VINs listed are added to the account.DELETE /connection/polestarerases the credential only. Migration0024lets a Polestar connection stay without one: its vehicles and history are kept, and the collector no longer reads them until another credential is given.GET /connectiongivespolestar:last4,set_at,expires_at(90 days after it was given, an assumption) andrefused_at. Never the credential.connectionnames itsprovider; a Polestar's hascredential(set,refused,missing) and a nullapi_key.unshared_atcomes with the vehicle; the failure kinds includecredential_refused,unshared,not_granted.catalog.Brand), and the variant chosen sets its family;PUT …/modelchecks it withcatalog.Chosen.409 not_volvo.RUNSTEN_POLESTAR_BASE_URLis read by runsten-api as well.Contract changes are in
api/openapi.yamlandinternal/api/testdata/(a Polestar added to the fixtures;connection-polestar.json).Web
Development
sim.env,task run-api,run-collectorandconnect-simuse the simulated Data Portal;connect-simgives its development credential. Try it withtilt up -- --scenario=commute,polestar2.Documentation
documentation/guide/polestar.md(beta): creating the credential, the five domains, giving it, choosing the variant, the 90 days.Left open
ps2-lr-single-2024has no sourced net capacity: chosen, it gives no energies.Checks
task unit(butweb-audit: a vite advisory already onmain),task integration, andtask system, includingcompose-test(116 Playwright tests with axe).🤖 Generated with Claude Code