-
Notifications
You must be signed in to change notification settings - Fork 0
Internal endpoints
Describes any unique additional API endpoints. Most of them are in /internal/*
Creates a new API key
{"message":<api_key/str>,"description": f"THIS IS INTERNAL API/API key generated successfully"}
Creates a new Car. Header:
- vcc-api-key the api key created or the ready scenario key Body:
- VIN string (Use a dummy/simulated VIN for privacy)
- attributes a list of attributes (door status, engine status...) to be change. Can be empty
- values a list if values of changed attributes (it is not validated so your values could be not correct)
info: attribute and values length should be the same
Updates a specific car attributes. Header:
- vcc-api-key the api key created or the ready scenario key Body:
- VIN string
- attributes a list of attributes (door status, engine status...) to be change.
- values a list if values of changed attributes (it is validated. It means that only valid values for that attributes are updated)
info: there is additional attrbute nextInvoiceStatus it force the next invoice status ("" means auto mode)
Websocket on start sends all data about the car then sends data only of changed attributes. Query:
- VIN VIN of virtual vehicle you want to monitor
- key api key
Sends all data about the car. Header:
- VIN VIN of virtual vehicle you want to monitor
- key api key
Sends all information about Oauth2 settings header:
- vcc_api_key api key with enabled Oauth2
{
"client_secret": <str>,
"code": <str>,
"access_token": <str>,
"refresh_token": <str>,
"token_type": <str>,
"expires_in": 3599, # doesn't change and doesnt work
"redirect_uri": <str> # if nothing then all redirects are alowed. This examptions is made for testing and doesnt exist in volvo api
}
Disable Oauth2 flow for provided API key header:
- vcc_api_key api key with enabled Oauth2
{
"message": "OAuth2 deactivated successfully"
}
Creates new access and refresh tokens header:
- vcc_api_key api key with enabled Oauth2
{
"access_token": <str>,
"refresh_token": <str>,
"token_type": "Bearer", #static
"expires_in": 3599 #static
}
Activate Oauth2 flow for provided API key header:
- vcc_api_key api key with enabled Oauth2 body:
{
"client_secret": <str>,
"PKCE": <bool>,
"redirect_uri": <str/optional>
}
{
"message": "OAuth2 activated successfully"
}
Saves or loads saved data about one API key (persistent storage about car and OAuth2 status) header:
- vcc_api_key api key body: { "command": , "name": } legend:
- command: load or save
- name: It is a name About:
Data is stored in snapshots.json it load at start and save every time one is created You can save a snapshots of one api key and use it in different one
Scenario can be used for faster setting resetting statuses about car header:
- vcc_api_key api key body: { "VIN": , "scenario": } legend:
- scenario: name from scenario in scenario.json
- VIN: the car VIN from the api key that you want to load the scenario about:
Scenario is stored in scenarios.json. You can manual add or delete the scenario there. If scenarios.json is not valid JSON file then only default scenarios will be loaded
If an error is returned and it is not caused by missing data, the response will have the following format:
{ "error": {"message": "THIS IS INTERNAL API/<Error text>","description": <error description>"}}
Shows what the websocket sends. Query:
- VIN VIN of virtual vehicle you want to monitor
- key api key
If public mode is active it will show a small page with GitHub and and compare app else it will redirect to the login page
The main dashboard for the playground simulator. It allows you to:
- Generate a new API key or log in with an existing key.
- Select a virtual vehicle and modify its attributes or live state.
- Easily navigate to all other internal tools and endpoints.