User Related

User is the object representing an account holder. In practice this represents an owner or driver of a vehicle.

A user may have many vehicles (and a vehicle may have many users).

Get user information

Returns a User Object.

Provides the basic account information about a user.

Although the endpoint format takes an arbitraryuser_id, access tokens granted to external developers can only access the user account which generated them. For this reason, the term "me" is an alias for theuser_id of the access token's user.

Definition

GET /user/{id}/

Query Parameters

None

Example Request

curl  "https://api.vehiclemind.com/user/{id}/" \
  -H "Authorization:Bearer e5cdd2a2f2c52ac2ff9825f53ac566f45c513991"

Sample Response

{
  "id": "U_de0cf1b496008d9b",
  "url": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/",
  "username": "user-1@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "email": "user-1@example.com"
}

Get user profile information

Returns a UserProfile Object.

Definition

GET /user/{user_id}/profile/

Query Parameters

None

Example Request

curl  "https://api.vehiclemind.com/user/{user_id}/profile/" \
  -H "Authorization:Bearer e5cdd2a2f2c52ac2ff9825f53ac566f45c513991"

Sample Response

{
  "url": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/profile/",
  "user": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/",
  "date_joined": "2015-05-05T12:05:06.543641Z",
  "tagged_locations": []
}

Get user metatdata information

Returns a UserMetadata Object.

Definition

GET /user/{user_id}/metadata/

Query Parameters

None

Example Request

curl  "https://api.vehiclemind.com/user/{user_id}/metadata/" \
  -H "Authorization:Bearer e5cdd2a2f2c52ac2ff9825f53ac566f45c513991"

Sample Response

{
  "url": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/profile/",
  "user": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/"
}

List my devices

Returns an arrary of DeviceUserRelationship Objects.

Definition

GET /user/{user_id}/device/

Query Parameters

Parameter Description
user_id
Optional, default is null
Not provided
device_serial_number
Optional, default is null
(STRING) Serial Number
page
Optional, default is 1
(INTEGER) Specifies the page of paginated results to return.
limit
Optional, default is 10, max is 250. Though accounts have lower limits on vehicles that can be attached to an account.
(INTEGER) Number of results per page

Example Request

curl  "https://api.vehiclemind.com/user/{user_id}/device/" \
  -H "Authorization:Bearer e5cdd2a2f2c52ac2ff9825f53ac566f45c513991"

Sample Response

{
  results: [
    "id": "4aa9b556d5072af84efcb103",
    "url": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/device/4aa9b556d5072af84efcb103/",
    "version": 2,
    "direct_access_token": "authticket 1 4aa9b556:d5072af8:4efcb103 1 e6d9347e5341ac0a326a 192:8ac04c19:2cab9102:20ce85ef:b7c50475:a1efe6e3:6beb4fc2 1604786476 899dd3350aa9453b709b0d9c21ea4db2e00c1ff604e4a3f24d3c9b65a5dc9543a1ec49f78445f7b27ce291b1aefc75ce221e94cf1b821b2c31157e0b9ef31a7b6b5ca102792392be124278eaa0d3f022f185153b65d548dc7619261a13f20c96dc7c9c5faa8097e3e8c4171f3bed116329a3447eba93ec588884410b92e08068",
    "app_encryption_key": "4b5199c1899da2aa98baeac4af3e078e"
  ]
}

Get a single device's information

Returns a DeviceUserRelationship Object.

Definition

GET /user/{user_id}/device/{device_id}/

Query Parameters

None

Example Request

curl  "https://api.vehiclemind.com/user/{user_id}/device/{device_id}/" \
  -H "Authorization:Bearer e5cdd2a2f2c52ac2ff9825f53ac566f45c513991"

Sample Response

{
  "id": "4aa9b556d5072af84efcb103",
  "url": "https://api.vehiclemind.com/user/U_de0cf1b496008d9b/device/4aa9b556d5072af84efcb103/",
  "version": 2,
  "direct_access_token": "authticket 1 4aa9b556:d5072af8:4efcb103 1 e6d9347e5341ac0a326a 192:8ac04c19:2cab9102:20ce85ef:b7c50475:a1efe6e3:6beb4fc2 1604786476 899dd3350aa9453b709b0d9c21ea4db2e00c1ff604e4a3f24d3c9b65a5dc9543a1ec49f78445f7b27ce291b1aefc75ce221e94cf1b821b2c31157e0b9ef31a7b6b5ca102792392be124278eaa0d3f022f185153b65d548dc7619261a13f20c96dc7c9c5faa8097e3e8c4171f3bed116329a3447eba93ec588884410b92e08068",
  "app_encryption_key": "4b5199c1899da2aa98baeac4af3e078e"
}