Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A abocar
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • cct
  • abocar
  • Wiki
  • Vehicles

Last edited by Andrea Pavlovic Oct 07, 2021
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Vehicles

Vehicles

  • Vehicles
    • Example

Vehicles and their attached data will work pretty much as documented in the IronAPI documentation.

According to the client which is logged in, their universe will list the available options to list and change the data.

Many entites have and "owning_customer" as attributes - it is optional and will be set automatically, so best to never show it in forms and never send them. Exception: when creating or changing a vehicle, owning_customer is required and needs to be set by the user.

Some entities are only available to certain client agendas (e.g. vehicle_note). Sending a query joining this entity will result in an error, so do not do this.

Example

List all vehicles, filter by band "Renault", join internal notes, attached files and their type definitions:

#!json

# POST {{url}}/data/core/vehicle/query
{
  "conds" : {"me.brand" : "Renault"},
  "attrs" : {
    "prefetch" : ["core__vehicle_note__vehicle", {"core__vehicle_file__vehicle" : "vehicle_document_type"}]
  }
}

Note that this query will fail for clients without "admin" or "employee" agendas, as they have no access to "vehicle_note".

core__vehicle_file__vehicle.id can be used to show a download button for the file. The Link will looks something like this

#!

{{url}}/data/core/file/3/download/file
Clone repository
  • Customers
  • Home
  • Queries
  • Test_Setup
  • Vehicles
  • v2