Discussions

Ask a Question
Back to All

How to query for an asset by tagid, perhaps this is a custom field?

I am using this endpoint /api/v1/query/Location

And this paylaod

'QueryExpression' => [
                'EntityType' => 'Location',
                'PropertySet' => [
                    'Properties' => ['Id', 'ModelId', 'Name', 'ParentId']
                ],
                'Criteria' => [
                    'Conditions' => [
                        [
                            'PropertyName' => 'TagId',
                            'Operator' => 'Like',
                            'Values' => ["%{$search_tag}%"]
                        ]
                    ],
                    'FilterOperator' => 'And'
                ]
            ]
        ];

However I get the response

[ErrorMessage] => Location entity does not expose "TagId" property.

But tagid is a propery/column that does show in the left column of the assetdetails page for this asset.