我正在通过Python/Dash查询V1 (/query.v1 API),以获得所有带有特定标签的故事。
API主体的Where条件为
"where": {
"TaggedWith":"Search-Module" ,
"Team.ID": "Team:009"
},但是我想添加OR条件(比如用"Search-Module OR Result-Module“标记的资产)
"where": {
"TaggedWith":"Search-Module;Result-Module" ,
"Team.ID": "Team:009"
},V1中的文档非常基础,我无法找到其他标准的正确方法。
https://community.versionone.com/VersionOne_Connect/Developer_Library/Sample_Code/Tour_of_query.v1
感谢任何人的指点。
发布于 2020-10-26 05:50:07
可以在with属性中为变量设置备用值,并在where或filter属性值中使用该变量:
{
"from": "Story",
"select": [
"Name"
],
"where": {
"Team.ID": "Team:009",
"TaggedWith": "$tags"
},
"with": {
"$tags": [
"Search-Module",
"Result-Module"
]
}
}您可以选择使用, (逗号)作为分隔符:
"with": {
"$tags": "Search-Module,Result-Module"
}在VersionOne Grammar项目中找到了多值变量的最后一个示例(但用于rest-1.v1端点)。
https://stackoverflow.com/questions/64162101
复制相似问题