# REST API

The Vehicle Data API lets you work with car data on any platform using a REST API. This tutorial will help you get started and show you how to work with it. By following the steps you will be receiving odometer data from the car simulator.

{% hint style="info" %}
**ENDPOINT URL**

Note that the REST API base URL is <https://sandbox.api.high-mobility.com/v1> when working with the sandbox vehicles and <https://api.high-mobility.com/v1> for live vehicle data.

When you use the configuration snippets from the platform as shown in this tutorial, you will always be using the right URL automatically.
{% endhint %}

### 1. Create an application

Visit the [Console](http://console.high-mobility.com/), create an application and select the data which are intrested in.

### 2. Create a simulator&#x20;

In the "Simulation studio" you are able to create vehicles to link with your app and to test with the simulators. Go to the simulation studio and click the big plus (+) button.

### 3. Link Vehicle and Retrieve Access Token

Now to use the REST API you will need to create an Access Token. Follow the [Fleet Clearance](/docs/getting-started/fleet-clearance.md) guide  for fleet vehicles.&#x20;

### 4. Send a Request

Once the simulator is open, fire away a request. For example to get the diagnostics state of the vehicle.

If you see that the app lacks permissions, you will need to revisit step two of the "[Create an application](#id-1.-create-an-application)" section of this document and select the appropriate permissions for your telematics command.

```javascript
const request = require('request')

request.get({
  url: 'https://sandbox.api.high-mobility.com/v1/vehicle-data/autoapi-13/{vin}',
  headers: {
    Authorization: 'Bearer ' + accessToken
  }
}, (error, response, body) => {
  console.log('error:', error)
  console.log('statusCode:', response && response.statusCode)
  console.log('body:', body)
})

```

<br>

{% hint style="info" %}
**AUTO API**

Check out the [Data API OpenAPI Specification](/api-references/data/vehicle-data.md) for all details
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.high-mobility.com/docs/vehicle-data/rest-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
