这是我第一次发帖,所以我希望我提供足够的细节 . 我正在尝试使用各自的标签检索所有产品属性 . 使用:V1 / products / attributes?searchCriteria [filter_groups] [0] [filters] [0] [field] = attribute_code&searchCriteria [filter_groups] [0] [filters] [0] [value] = &searchCriteria [filter_groups] [ 0] [过滤器] [0] [condition_type] =当量

如果我尝试,我可以检索特定属性代码的特定ID:

V1 /产品/属性?searchCriteria [filter_groups] [0] [过滤器] [0] [字段] = entity_type_id&searchCriteria [filter_groups] [0] [过滤器] [0] [值] = &searchCriteria [filter_groups] [0] [过滤器] [0] [condition_type] =当量

I get the following error: 生成的输出:iwwshr.Exceptions.WebServiceCallFailedException:远程服务器返回错误:(500)内部服务器错误 . ProtocolError http://VMDP-200CRM2011:8081/magento/rest/default/V1/products/attributes?searchCriteria[filter_groups][0][filters][0][field]=entity_type_id&searchCriteria[filter_groups][0][filters][0][value]=4&searchCriteria[filter_groups][0][filters][0][condition_type]=eq Web服务器在Tool.Classes.Runtime.HttpOperationWrapper.DoSampleCall(String xmlCallData)的Tool.Classes.Runtime.HttpOperationWrapper.DoCall()处返回:{"message":"Internal Error. Details are available in Magento log file. Report ID: webapi-57cd41117122e"}

Going to the logs I get: 报告ID:webapi-57cd41117122e;消息:SQLSTATE [23000]:完整性约束违规:1052列'entity_type_id'在where子句不明确,查询为:SELECT COUNT(DISTINCT main_table.attribute_id)FROM eav_attribute AS main_table INNER JOIN eav_entity_type AS entity_type ON main_table.entity_type_id = entity_type.entity_type_id INNER JOIN eav_entity_attribute ON main_table.attribute_id = eav_entity_attribute.attribute_id INNER JOIN catalog_eav_attribute AS additional_table ON main_table.attribute_id = additional_table.attribute_id WHERE( entity_type_code = 'catalog_product')AND( entity_type_id = '4')'在C:\ wamp64 \ www \ magento \ vendor \ magento \ framework中\的WebAPI \ ErrorProcessor.php:194

The query being run is: SELECT COUNT(DISTINCT main_table.attribute_id)FROM eav_attribute AS main_table INNER JOIN eav_entity_type AS entity_type ON main_table.entity_type_id = entity_type.entity_type_id INNER JOIN eav_entity_attribute ON main_table.attribute_id = eav_entity_attribute.attribute_id INNER JOIN catalog_eav_attribute AS additional_table ON main_table.attribute_id = additional_table.attribute_id WHERE( entity_type_code = 'catalog_product')AND( entity_type_id = '4')

Which returns: 错误代码:1052 . where子句中的列'entity_type_id'是不明确的

If I change the query to: SELECT COUNT(DISTINCT main_table.attribute_id)FROM eav_attribute AS main_table INNER JOIN eav_entity_type AS entity_type ON main_table.entity_type_id = entity_type.entity_type_id INNER JOIN eav_entity_attribute ON main_table.attribute_id = eav_entity_attribute.attribute_id INNER JOIN catalog_eav_attribute AS additional_table ON main_table.attribute_id = additional_table.attribute_id WHERE( entity_type_code = 'catalog_product')AND( main_table . entity_type_id = '4')

A row is returned.

也许我做错了但我不确定如何检索所有产品属性???