Hi Lnabong,
Your message is wrongly constructed. Use EntityQuery directly (not under Query), Query is for CZQL query.
Hope this helps,
Ophir
Post
Followdata/countQuery InvalidOperation
In postman, I have:
{
"query": {
"entityquery" : {
"typeName" : "WorkItem",
"fields" : [ "name" ],
}
}
}
It throws:
"errorCode": "InvalidOperation"
"message": "Invalid operation: Could not convert {\r\n \"typeName\": \"WorkItem\",\r\n \"deleted\": false\r\n} to Query",
"referenceId": "3HEvymohy0Ltv0PI69ktlj"
I assume other fields are not required for the method request
Please sign in to leave a comment.
6 comments
Date
Votes
I just based it at https://api.clarizen.com/V2.0/services/data/CountQuery.. I tried removing the query{} code block --- message: Missing argument Query, referenceId : 3xBgMtGh5OsJmQZ0H48uN
This is one of those API where you need to "hint" us which type you are talking about. In this example, the correct JSON should look like this:
(Note the "_type" property):
{
"query": {
"_type": "EntityQuery",
"typeName": "WorkItem"
}
}
Great! thanks for the help.! About the "hint you which type.." will I encounter that again on the condition types?
Probably in "IN" conditions where the right side is a query
I think you will also for Logical conditions (And/Or)