Confusing Reltype for vehicle-attributes search

Doing an API call https://api.{{HOST}}/v2/vehicle-attributes/search?fields=project,id,vehicles I receive the following response.

            "project": {
                "_relType": "projects",
                "id": "eb2f41f4-a3c1-11ed-8382-3be0f541a58e"
            },
            "id": "6a7ca9e2-bdcb-11ed-8307-97ba4cccdb43",
            "vehicles": [
                {
                    "_relType": "vehicles",
                    "_relId": "1bd98818-c065-11ed-8590-0b318c293fce", <<<<<<<<<<<<<<<<<<<<
                    "id": "2778660e-a3c2-11ed-bed8-7fd59f817f53"
                }
            ]

The given _relId isn’t related to a vehicle but instead to a vehicle-attribute.

Going an API Call to https://api.{{HOST}}/v2/vehicles/_/attributes/search gives the expected result.

            "_relType": "vehicle-attributes",
            "_relId": "1bd98818-c065-11ed-8590-0b318c293fce", <<<<<<<<<<<<<<<<<<<<
            "id": "6a7ca9e2-bdcb-11ed-8307-97ba4cccdb43",
            "project": {
                "_relType": "projects",
                "id": "eb2f41f4-a3c1-11ed-8382-3be0f541a58e"
            },
            "vehicle": {
                "_relType": "vehicles",
                "id": "2778660e-a3c2-11ed-bed8-7fd59f817f53"
            }

My suggestion is to rename the relType to vehicle-attributes to prevent confusion.

1 Like

Hey Matthias,

thanks for reporting, i will forward it to our API experts. It seems like a typo / copy paste error on our side and i guess we can fix it easily.

Kind Regards, Hans

1 Like

Okay, double checked it. What you get is correct the _relType always refers to the id the _relId is the id of the relation (vehicle to vehicle-attribute relation in this case).

I hope this clarifies it :slight_smile: