Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ИмяТипЗначение по умолчаниюОписание
page[offset]int0Пропустить несколько первых записей
page[limit]int200Количество ТС в выводе
fields[carParams]string

Фильтрация полей отображаемых в параметрах ТС.

filter[carParams]string

Фильтрация списка параметров ТС (поддерживается фильтрация только по Car и Id).

sortstring
Сортировка (поддерживается только для полей Car и Id)
includestring
Добавить связанные объекты в ответ.
with_defaultsbool1При отсутствии установленного параметра у объекта отображать значение по умолчанию.

Ответ:

       Ответ присылается в формате JSON API.

...

Code Block
GET https://api.url/v2.1/user/1/cars/params?with_defaults=0 HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <auth token>

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
Allow: GET
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT
					
{
    "links": {
        "self": "http://api.url/v2.1/user/1/cars/params?with_defaults=0",
        "first": "http://api.url/v2.1/user/1/cars/params?with_defaults=0",
        "next": "https://api.url/v2.1/user/1/cars/params?page[offset]=200&page[limit]=200&with_defaults=0",
        "last": "https://api.url/v2.1/user/1/cars/params?page[offset]=400&page[limit]=200&with_defaults=0"
    },
   "meta":{
        "total_count": 450
    },
    "data": [
        {
            "id": "2"
            "type": "carParams",
            "attributes": {
                "CAR_OFFLINE_THRESHOLD": 120,
                "CAR_MAXIMUM_SPEED": 90,
                "CAR_FMS_ODOMETER_THRESHOLD": null,
                "CAR_MAINTENANCE_DATE": null,
                "CAR_MAINTENANCE_MILEAGE": null,
                "CAR_PRIMARY_INSURANCE_DATE": null,
                "CAR_SECONDARY_INSURANCE_DATE": null,
                "CAR_TAHO_CALIBRATION_TO_DATE": null,
                "CAR_SERTICATE_SERIAL_NUMBER": null,
                "CAR_WEIGHT": null,
                "CAR_COLOR": "00FEFE",
                "CAR_MAX_ALLOWED_WEIGHT": null,
                "CAR_ECO_CLASS": null,
                "CAR_CHASSIS": null,
                "CAR_BODY": null,
                "CAR_ODOMETER_LIMIT_DAILY": null,
                "CAR_ODOMETER_LIMIT_WEEKLY": null,
                "CAR_ODOMETER_LIMIT_MONTHLY": null,
                "CAR_ODOMETER_LIMIT_YEARLY": null,
                "CAR_ODOMETER_LIMIT_ON_HOLIDAY": null,
                "WINTER_START_DATE": null,
                "WINTER_END_DATE": null,
                "CAR_ODOMETER_LIMIT_MONTHLY_ON_HOLIDAY": null,
                "CAR_TRANSMISSION": "2",
                "CAR_NUMBER_OF_PASSENGERS": null,
                "CAR_NUMBER_OF_DOORS": null,
                "CAR_ENGINE_POWER": null,
                "CAR_START_UP_DATE": null,
                "CAR_ENGINE_VOLUME": null,
                "CAR_OWNER": null,
                "CAR_COLOR_HEX": null,
                "CAR_LEASING_COMPANY": null,
                "CAR_MAXIMUM_SPEED_WINTER": null,
                "CAR_ODOMETER_LIMIT_YEARLY_ON_HOLIDAY": null
            },
            "relationships": {
                "Car": { "data": {"type": "car": "id": "2"} }
            }
 
        },
        {
            "id": "21",
            "type": "carParams",
            "attributes": {
                "CAR_OFFLINE_THRESHOLD": null,
                "CAR_MAXIMUM_SPEED": null,
                "CAR_FMS_ODOMETER_THRESHOLD": null,
                "CAR_MAINTENANCE_DATE": "2015-04-16",
                "CAR_MAINTENANCE_MILEAGE": null,
                "CAR_PRIMARY_INSURANCE_DATE": null,
                "CAR_SECONDARY_INSURANCE_DATE": null,
                "CAR_TAHO_CALIBRATION_TO_DATE": null,
                "CAR_SERTICATE_SERIAL_NUMBER": null,
                "CAR_WEIGHT": null,
                "CAR_COLOR": null,
                "CAR_MAX_ALLOWED_WEIGHT": null,
                "CAR_ECO_CLASS": "4",
                "CAR_CHASSIS": null,
                "CAR_BODY": null,
                "CAR_ODOMETER_LIMIT_DAILY": null,
                "CAR_ODOMETER_LIMIT_WEEKLY": null,
                "CAR_ODOMETER_LIMIT_MONTHLY": null,
                "CAR_ODOMETER_LIMIT_YEARLY": null,
                "CAR_ODOMETER_LIMIT_ON_HOLIDAY": null,
                "WINTER_START_DATE": "--12-01",
                "WINTER_END_DATE": "--03-09",
                "CAR_ODOMETER_LIMIT_MONTHLY_ON_HOLIDAY": null,
                "CAR_TRANSMISSION": 2,
                "CAR_NUMBER_OF_PASSENGERS": null,
                "CAR_NUMBER_OF_DOORS": 4,
                "CAR_ENGINE_POWER": null,
                "CAR_START_UP_DATE": null,
                "CAR_ENGINE_VOLUME": null,
                "CAR_OWNER": null,
                "CAR_COLOR_HEX": null,
                "CAR_LEASING_COMPANY": null,
                "CAR_MAXIMUM_SPEED_WINTER": null,
                "CAR_ODOMETER_LIMIT_YEARLY_ON_HOLIDAY": null
            },
            "relationships": {
                "Car": { "data": {"type": "car": "id": "21"} }
            }
        }
        ...
    ]
}

...