HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions
These docs are for v20.3.44. Click to read the latest docs for v20.3.192.

Discussions

Ask a Question
Back to All

Query Service API Call Not Getting Data

Hello,

In a recent Tech alert there was mentioning of a deprecation of the IQA service in the API and a switch was being made to a new QueryService endpoint that was being developed.

I am trying to use that new endpoint to get data from an IQA via the API. I have read the tech alert and have tried to follow it as best I can, but I am not receiving any feedback as to if I am hitting the endpoint at all. I am using Postman for now before moving it into my code. Note: the specific version of the cloud hosted iMIS is: 20.3.69.27972. Also, I will find a way to attach screenshots to this question it is letting me currently when trying to post this.

It is mentioned that we must POST to the query service endpoint and pass any parameters to the query in the body of the request. I need a bit more clarification on how this process works because what I am trying is just either giving me no data in return or a message telling me to contact the administrator.

So, please allow me to lay out everything. I have an IQA I made, there are two optional parameters that can used. They ARE defined in the IQA itself. This IQA queries and joins the Contact and Activity tables. The two filters/parameters I have setup are for the Activity's Category property and the Contact's iMIS ID property.

Keep in mind these are optional parameters, how would I go about passing these in to the endpoint. I have seen in the screenshots they are passed via the parameters and the body? What if they are optional and nothing is passed in? Do they parameters need to account for that or can they be left blank?

The same type of question can go for the body of the request as well. Do I need to account for optional parameters? How would that look?

Right now, this is what the body of the request looks like:

{
"$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
"EntityTypeName": "QueryService",
"OperationName": "FindByPath",
"Parameters": {
"$type": "System.Collection.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
"$values": [
{
"$type": "System.String",
"$value": "$/AGCS/Activity CEU by Category and ID DB Test"
}
]
}
}

Again, I see how it's done in the tech alert, but I really need some clarification here because I am not getting any results back.

Thanks!