我正在通过Python/Dash查询V1(/query.V1 API(,以获取带有特定标签的所有故事。
API主体的Where标准为
"where": {
"TaggedWith":"Search-Module" ,
"Team.ID": "Team:009"
},
但我想添加OR标准(类似于用"搜索模块或结果模块"标记的资产(
"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
任何建议都将不胜感激。
您可以为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"
}
多值变量(但对于rest-1.v1
端点(的最后一个示例已在VersionOne Grammar项目中找到。