Discussions
/api/Communication with no ID returns a 400 and error
iMIS 20.3.113.63375 - call made to /api/Communication (as per https://developer.imis.com/reference/getcommunication-1) with no ID parameter returns a 400 response and the text:
{"$type":"Asi.Soa.Core.DataContracts.ValidationResultsData, Asi.Contracts","Errors":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts","$values":[{"$type":"Asi.Soa.Core.DataContracts.ValidationResultData, Asi.Contracts","Message":"Query does not contain any criteria"}]},"Warnings":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts","$values":[]}}
Would have expected it to return the communications as per "Returns a list or single record of Communication".
Thanks.
We'll be looking into the returned error, thank you for bringing that to our attention.
In the meantime a possible workaround is querying the DocumentSummary endpoint with a filter on DocumentTypeId=COM to filter to communication documents. You can then use the returned document IDs to query the Communication endpoint by ID.
Thank you